Linux 4.4.165
Greg KH
maintainerI'm announcing the release of the 4.4.165 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
.gitignore | 1 Kbuild | 25 -------------- Makefile | 39 +++++++++++++++------- arch/arm64/Makefile | 4 ++ arch/arm64/crypto/sha1-ce-core.S | 6 ++- arch/arm64/crypto/sha1-ce-glue.c | 11 +----- arch/arm64/crypto/sha2-ce-core.S | 6 ++- arch/arm64/crypto/sha2-ce-glue.c | 13 ++----- arch/arm64/include/asm/percpu.h | 3 + arch/ia64/kernel/Makefile | 26 +-------------- arch/s390/kernel/vdso32/Makefile | 6 +-- arch/s390/kernel/vdso64/Makefile | 6 +-- arch/s390/numa/numa.c | 1 arch/um/os-Linux/skas/process.c | 5 ++ arch/x86/Makefile | 39 ++++++++++++++++------ arch/x86/boot/compressed/aslr.c | 3 + arch/x86/boot/string.c | 9 +++++ arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 +--- arch/x86/include/asm/asm.h | 1 drivers/acpi/acpi_platform.c | 1 drivers/block/zram/zram_drv.c | 26 +++------------ drivers/bluetooth/Kconfig | 1 drivers/clk/samsung/clk-exynos5420.c | 1 drivers/firmware/efi/libstub/Makefile | 2 - drivers/firmware/efi/libstub/arm64-stub.c | 10 +++++ drivers/hid/uhid.c | 13 +++++++ drivers/hwmon/ibmpowernv.c | 7 +--- drivers/media/v4l2-core/v4l2-event.c | 43 +++++++++++++------------ drivers/media/v4l2-core/videobuf2-core.c | 9 +---- drivers/misc/atmel-ssc.c | 2 - drivers/misc/sgi-gru/grukdump.c | 4 ++ drivers/net/ethernet/broadcom/tg3.c | 18 +++++++++- drivers/platform/x86/acerhdf.c | 1 drivers/uio/uio.c | 7 ++-- drivers/usb/class/cdc-acm.c | 3 + drivers/usb/core/quirks.c | 8 ++++ drivers/usb/host/xhci-hub.c | 2 - drivers/usb/misc/appledisplay.c | 1 fs/btrfs/disk-io.c | 19 ++++++++--- fs/exofs/super.c | 5 ++ fs/gfs2/rgrp.c | 3 + fs/hfs/brec.c | 4 ++ fs/hfsplus/brec.c | 4 ++ fs/reiserfs/xattr.c | 7 ++++ include/linux/kbuild.h | 6 +-- include/linux/module.h | 4 +- include/linux/netfilter/ipset/ip_set_comment.h | 4 +- include/linux/uaccess.h | 3 + lib/raid6/test/Makefile | 4 +- net/core/dev.c | 4 ++ net/core/flow_dissector.c | 4 +- net/ipv4/ip_tunnel_core.c | 2 - net/ipv6/route.c | 8 +++- net/netfilter/ipset/ip_set_hash_netportnet.c | 8 ++-- net/netfilter/xt_IDLETIMER.c | 20 +++++++++++ net/sunrpc/xdr.c | 2 - scripts/Kbuild.include | 18 ++++++---- scripts/Makefile.build | 8 ++++ scripts/Makefile.extrawarn | 1 scripts/Makefile.lib | 31 ++++++++++++++++++ scripts/mod/Makefile | 28 +--------------- 61 files changed, 348 insertions(+), 219 deletions(-)
Al Viro (1):
new helper: uaccess_kernel()
Andreas Gruenbacher (1):
gfs2: Put bitmap buffers in put_super
Ard Biesheuvel (3):
crypto: arm64/sha - avoid non-standard inline asm tricks efi/libstub/arm64: Force 'hidden' visibility for section markers efi/libstub/arm64: Set -fpie when building the EFI stub
Arnd Bergmann (1):
modules: mark __inittest/__exittest as __maybe_unused
Behan Webster (2):
kbuild: Add better clang cross build support
kbuild: use -Oz instead of -Os when using clang
Chengguang Xu (1):
fs/exofs: fix potential memory leak in mount option parsing
Chris Fries (1):
kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
Dan Carpenter (1):
uio: Fix an Oops on load
David Ahern (1):
ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF
David Lin (1):
kbuild: clang: fix build failures with sparse check
Emmanuel Pescosta (1):
usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB
Eric Biggers (1):
HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges
Eric Dumazet (1):
net-gro: reset skb->pkt_type in napi_reuse_skb()
Eric Westbrook (1):
netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net
Ernesto A. Fernández (2):
hfs: prevent btree data loss on root split
hfsplus: prevent btree data loss on root split
Geert Uytterhoeven (1):
hwmon: (ibmpowernv) Remove bogus __init annotations
Greg Kroah-Hartman (2):
Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV" Linux 4.4.165
Gustavo A. R. Silva (1):
drivers/misc/sgi-gru: fix Spectre v1 vulnerability
Hans Verkuil (1):
Revert "media: videobuf2-core: don't call memop 'finish' when queueing"
Hans de Goede (1):
ACPI / platform: Add SMB0001 HID to forbidden_id_list
Jann Horn (1):
reiserfs: propagate errors from fill_with_dentries() properly
Jeremy Linton (1):
lib/raid6: Fix arm64 test build
Jeroen Hofstee (1):
kbuild: fix asm-offset generation to work with clang
Jozsef Kadlecsik (1):
netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment()
Justin M. Forbes (1):
s390/mm: Fix ERROR: "__node_distance" undefined!
Kai-Heng Feng (1):
USB: quirks: Add no-lpm quirk for Raydium touchscreens
Lu Fengqi (1):
btrfs: fix pinned underflow after transaction aborted
Maarten Jacobs (1):
usb: cdc-acm: add entry for Hiro (Conexant) modem
Marek Szyprowski (1):
clk: samsung: exynos5420: Enable PERIS clocks for suspend
Mark Charlebois (1):
kbuild, LLVMLinux: Add -Werror to cc-option to support clang
Masahiro Yamada (3):
kbuild: consolidate redundant sed script ASM offset generation
kbuild: drop -Wno-unknown-warning-option from clang options
kbuild: move cc-option and cc-disable-warning after incl. arch Makefile
Mathias Nyman (1):
xhci: Fix USB3 NULL pointer dereference at logical disconnect.
Matthias Kaehlcke (10):
kbuild: Consolidate header generation from ASM offset information
kbuild: clang: Disable 'address-of-packed-member' warning
arm64: Disable asm-operand-width warning for clang
x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility
kbuild: Add __cc-option macro
x86/build: Use __cc-option for boot code compiler options
x86/build: Specify stack alignment for clang
x86/build: Fix stack alignment for CLang
x86/build: Use cc-option to validate stack alignment parameter
Mattias Jacobsson (1):
USB: misc: appledisplay: add 20" Apple Cinema Display
Michael Davidson (3):
kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS crypto, x86: aesni - fix token pasting for clang x86/boot: #undef memcpy() et al in string.c
Minchan Kim (1):
zram: close udev startup race condition as default groups
Nathan Chancellor (2):
arm64: percpu: Initialize ret in the default case
misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data
Nick Desaulniers (2):
kbuild: fix linker feature test macros when cross compiling with Clang
kbuild: clang: remove crufty HOSTCFLAGS
Paul Gortmaker (1):
platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307
Richard Weinberger (1):
um: Give start_idle_thread() a return code
Sabrina Dubroca (1):
ip_tunnel: don't force DF when MTU is locked
Sakari Ailus (1):
media: v4l: event: Add subscription to list before calling "add" operation
Siva Reddy Kallam (1):
tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths
Sodagudi Prasad (1):
kbuild: clang: disable unused variable warnings only when constant
Stefan Agner (2):
kbuild: set no-integrated-as before incl. arch Makefile
kbuild: allow to use GCC toolchain not in Clang search path
Taehee Yoo (1):
netfilter: xt_IDLETIMER: add sysfs filename checking routine
Vasily Gorbik (1):
s390/vdso: add missing FORCE to build targets
Vinícius Tinti (1):
kbuild: Add support to generate LLVM assembly files
YueHaibing (1):
SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer()
배석진 (1):
flow_dissector: do not dissect l4 ports for fragments
Greg KH
maintainer.gitignore +1 -0
@@ -33,6 +33,7 @@ *.lzo *.patch *.gcno +*.ll modules.builtin Module.symvers *.dwo
Kbuild +0 -25
@@ -6,31 +6,6 @@ # 3) Generate asm-offsets.h (may need bounds.h and timeconst.h) # 4) Check for missing system calls -# Default sed regexp - multiline due to syntax constraints -define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" -endef - -# Use filechk to avoid rebuilds when a header changes, but the resulting file -# does not -define filechk_offsets - (set -e; \ - echo "#ifndef $2"; \ - echo "#define $2"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y); \ - echo ""; \ - echo "#endif" ) -endef - ##### # 1) Generate bounds.h
Makefile +27 -12
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 164 +SUBLEVEL = 165 EXTRAVERSION = NAME = Blurry Fish Butt
@@ -303,14 +303,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ HOSTCC = gcc HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 +HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 HOSTCXXFLAGS = -O2 -ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1) -HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \ - -Wno-missing-field-initializers -fno-delete-null-pointer-checks -endif - # Decide whether to build built-in, modular, or both. # Normally, just do built-in.
@@ -612,6 +607,22 @@ endif # $(dot-config) # Defaults to vmlinux, but the arch makefile usually adds further targets all: vmlinux +ifeq ($(cc-name),clang) +ifneq ($(CROSS_COMPILE),) +CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) +CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR) +GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) +endif +ifneq ($(GCC_TOOLCHAIN),) +CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) +endif +KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) +KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) +KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) +KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) +endif + # The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default # values of the respective KBUILD_* variables ARCH_CPPFLAGS :=
@@ -628,7 +639,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os +KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) else ifdef CONFIG_PROFILE_ALL_BRANCHES KBUILD_CFLAGS += -O2
@@ -699,10 +710,9 @@ KBUILD_CFLAGS += $(stackp-flag) ifeq ($(cc-name),clang) KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) -KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,) -KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) KBUILD_CFLAGS += $(call cc-disable-warning, gnu) +KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) # Quiet clang warning: comparison of unsigned expression < 0 is always false KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
@@ -713,11 +723,11 @@ KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) else # These warnings generated too much noise in a regular build. -# Use make W=1 to enable them (see scripts/Makefile.build) +# Use make W=1 to enable them (see scripts/Makefile.extrawarn) KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) -KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) endif +KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else
@@ -1297,6 +1307,8 @@ help: @echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)' @echo ' dir/ - Build all files in dir and below' @echo ' dir/file.[ois] - Build specified target only' + @echo ' dir/file.ll - Build the LLVM assembly file' + @echo ' (requires compiler support for LLVM assembly generation)' @echo ' dir/file.lst - Build specified mixed source/assembly target only' @echo ' (requires a recent binutils and recent build (System.map))' @echo ' dir/file.ko - Build module including final link'
@@ -1472,6 +1484,7 @@ clean: $(clean-dirs) -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ -o -name '*.symtypes' -o -name 'modules.order' \ -o -name modules.builtin -o -name '.tmp_*.o.*' \ + -o -name '*.ll' \ -o -name '*.gcno' \) -type f -print | xargs rm -f # Generate tags for editors
@@ -1575,6 +1588,8 @@ endif $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) +%.ll: %.c prepare scripts FORCE + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules /: prepare scripts FORCE
arch/arm64/Makefile +4 -0
@@ -56,6 +56,10 @@ else TEXT_OFFSET := 0x00080000 endif +ifeq ($(cc-name),clang) +KBUILD_CFLAGS += $(call cc-disable-warning, asm-operand-widths) +endif + # KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61) # in 32-bit arithmetic KASAN_SHADOW_OFFSET := $(shell printf "0x%08x00000000\n" $$(( \
arch/arm64/crypto/sha1-ce-core.S +4 -2
@@ -82,7 +82,8 @@ ENTRY(sha1_ce_transform) ldr dgb, [x0, #16] /* load sha1_ce_state::finalize */ - ldr w4, [x0, #:lo12:sha1_ce_offsetof_finalize] + ldr_l w4, sha1_ce_offsetof_finalize, x4 + ldr w4, [x0, x4] /* load input */ 0: ld1 {v8.4s-v11.4s}, [x1], #64
@@ -132,7 +133,8 @@ CPU_LE( rev32 v11.16b, v11.16b ) * the padding is handled by the C code in that case. */ cbz x4, 3f - ldr x4, [x0, #:lo12:sha1_ce_offsetof_count] + ldr_l w4, sha1_ce_offsetof_count, x4 + ldr x4, [x0, x4] movi v9.2d, #0 mov x8, #0x80000000 movi v10.2d, #0
arch/arm64/crypto/sha1-ce-glue.c +3 -8
@@ -17,9 +17,6 @@#include <linux/crypto.h> #include <linux/module.h> -#define ASM_EXPORT (sym, val) \ - asm(".globl " #sym "; .set " #sym ", %0" :: "I"(val)); -MODULE_DESCRIPTION ("SHA1 secure hash using ARMv8 Crypto Extensions" );MODULE_AUTHOR ("Ard Biesheuvel <[email protected]>" );MODULE_LICENSE ("GPL v2" );
@@ -32,6 +29,9 @@ struct sha1_ce_state { asmlinkage void sha1_ce_transform(struct sha1_ce_state *sst, u8 const *src,int blocks); +const u32 sha1_ce_offsetof_count = offsetof(struct sha1_ce_state, sst.count); +const u32 sha1_ce_offsetof_finalize = offsetof(struct sha1_ce_state , finalize); +static int sha1_ce_update (struct shash_desc *desc,const u8 *data,unsigned int len) {
@@ -52,11 +52,6 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,struct sha1_ce_state *sctx =shash_desc_ctx (desc);bool finalize = !sctx->sst.count && !(len %SHA1_BLOCK_SIZE ); -ASM_EXPORT (sha1_ce_offsetof_count, - offsetof(struct sha1_ce_state, sst.count)); -ASM_EXPORT (sha1_ce_offsetof_finalize, - offsetof(struct sha1_ce_state , finalize)); -/* * Allow the asm code to perform the finalization if there is no * partial data and the input is a round multiple of the block size.
arch/arm64/crypto/sha2-ce-core.S +4 -2
@@ -88,7 +88,8 @@ ENTRY(sha2_ce_transform) ld1 {dgav.4s, dgbv.4s}, [x0] /* load sha256_ce_state::finalize */ - ldr w4, [x0, #:lo12:sha256_ce_offsetof_finalize] + ldr_l w4, sha256_ce_offsetof_finalize, x4 + ldr w4, [x0, x4] /* load input */ 0: ld1 {v16.4s-v19.4s}, [x1], #64
@@ -136,7 +137,8 @@ CPU_LE( rev32 v19.16b, v19.16b ) * the padding is handled by the C code in that case. */ cbz x4, 3f - ldr x4, [x0, #:lo12:sha256_ce_offsetof_count] + ldr_l w4, sha256_ce_offsetof_count, x4 + ldr x4, [x0, x4] movi v17.2d, #0 mov x8, #0x80000000 movi v18.2d, #0
arch/arm64/crypto/sha2-ce-glue.c +5 -8
@@ -17,9 +17,6 @@#include <linux/crypto.h> #include <linux/module.h> -#define ASM_EXPORT (sym, val) \ - asm(".globl " #sym "; .set " #sym ", %0" :: "I"(val)); -MODULE_DESCRIPTION ("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions" );MODULE_AUTHOR ("Ard Biesheuvel <[email protected]>" );MODULE_LICENSE ("GPL v2" );
@@ -32,6 +29,11 @@ struct sha256_ce_state { asmlinkage void sha2_ce_transform(struct sha256_ce_state *sst, u8 const *src,int blocks); +const u32 sha256_ce_offsetof_count = offsetof(struct sha256_ce_state , + sst.count); +const u32 sha256_ce_offsetof_finalize = offsetof(struct sha256_ce_state , + finalize); +static int sha256_ce_update (struct shash_desc *desc,const u8 *data,unsigned int len) {
@@ -52,11 +54,6 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data,struct sha256_ce_state *sctx =shash_desc_ctx (desc);bool finalize = !sctx->sst.count && !(len %SHA256_BLOCK_SIZE ); -ASM_EXPORT (sha256_ce_offsetof_count, - offsetof(struct sha256_ce_state, sst.count)); -ASM_EXPORT (sha256_ce_offsetof_finalize, - offsetof(struct sha256_ce_state , finalize)); -/* * Allow the asm code to perform the finalization if there is no * partial data and the input is a round multiple of the block size.
arch/arm64/include/asm/percpu.h +3 -0
@@ -84,6 +84,7 @@ static inline unsigned long __percpu_##op(void *ptr, \ : [val] "Ir" (val)); \break ; \default : \ + ret =0 ; \BUILD_BUG (); \ } \ \
@@ -113,6 +114,7 @@ static inline unsigned long __percpu_read(void *ptr, int size) ret =ACCESS_ONCE (*(u64 *)ptr);break ;default : + ret =0 ;BUILD_BUG (); }
@@ -182,6 +184,7 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val, : [val] "r" (val));break ;default : + ret =0 ;BUILD_BUG (); }
arch/ia64/kernel/Makefile +2 -24
@@ -50,32 +50,10 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31 # The gate DSO image is built using a special linker script. include $(src)/Makefile.gate -# Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config -define sed-y - "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" -endef -quiet_cmd_nr_irqs = GEN $@ -define cmd_nr_irqs - (set -e; \ - echo "#ifndef __ASM_NR_IRQS_H__"; \ - echo "#define __ASM_NR_IRQS_H__"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y) $<; \ - echo ""; \ - echo "#endif" ) > $@ -endef - # We use internal kbuild rules to avoid the "is up to date" message from make arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c $(Q)mkdir -p $(dir $@) $(call if_changed_dep,cc_s_c) -include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s - $(Q)mkdir -p $(dir $@) - $(call cmd,nr_irqs) +include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE + $(call filechk,offsets,__ASM_NR_IRQS_H__)
arch/s390/kernel/vdso32/Makefile +3 -3
@@ -29,7 +29,7 @@ GCOV_PROFILE := n $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) +$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE $(call if_changed,vdso32ld) # strip rule for the .so file
@@ -38,12 +38,12 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE $(call if_changed,objcopy) # assembly rules for the .S files -$(obj-vdso32): %.o: %.S +$(obj-vdso32): %.o: %.S FORCE $(call if_changed_dep,vdso32as) # actual build commands quiet_cmd_vdso32ld = VDSO32L $@ - cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ + cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $(filter %.lds %.o,$^) -o $@ quiet_cmd_vdso32as = VDSO32A $@ cmd_vdso32as = $(CC) $(a_flags) -c -o $@ $<
arch/s390/kernel/vdso64/Makefile +3 -3
@@ -29,7 +29,7 @@ GCOV_PROFILE := n $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so # link rule for the .so file, .lds has to be first -$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) +$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE $(call if_changed,vdso64ld) # strip rule for the .so file
@@ -38,12 +38,12 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE $(call if_changed,objcopy) # assembly rules for the .S files -$(obj-vdso64): %.o: %.S +$(obj-vdso64): %.o: %.S FORCE $(call if_changed_dep,vdso64as) # actual build commands quiet_cmd_vdso64ld = VDSO64L $@ - cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ + cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $(filter %.lds %.o,$^) -o $@ quiet_cmd_vdso64as = VDSO64A $@ cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
arch/s390/numa/numa.c +1 -0
@@ -47,6 +47,7 @@ int __node_distance(int a, int b) {return mode->distance ? mode->distance (a, b) :0 ; } +EXPORT_SYMBOL (__node_distance);int numa_debug_enabled;
arch/um/os-Linux/skas/process.c +5 -0
@@ -585,6 +585,11 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)fatal_sigsegv (); }longjmp (*switch_buf,1 ); + +/* unreachable */ +printk (UM_KERN_ERR "impossible long jump!" ); +fatal_sigsegv (); +return 0 ; }void initial_thread_cb_skas (void (*proc)(void *),void *arg)
arch/x86/Makefile +29 -10
@@ -11,6 +11,16 @@ else KBUILD_DEFCONFIG := $(ARCH)_defconfig endif +# For gcc stack alignment is specified with -mpreferred-stack-boundary, +# clang has the option -mstack-alignment for that purpose. +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) + cc_stack_align4 := -mpreferred-stack-boundary=2 + cc_stack_align8 := -mpreferred-stack-boundary=3 +else ifneq ($(call cc-option, -mstack-alignment=16),) + cc_stack_align4 := -mstack-alignment=4 + cc_stack_align8 := -mstack-alignment=8 +endif + # How to compile the 16-bit code. Note we always compile for -march=i386; # that way we can complain to the user if the CPU is insufficient. #
@@ -24,10 +34,11 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -D__KERNEL__ \ -DDISABLE_BRANCH_PROFILING \ -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ - -mno-mmx -mno-sse \ - $(call cc-option, -ffreestanding) \ - $(call cc-option, -fno-stack-protector) \ - $(call cc-option, -mpreferred-stack-boundary=2) + -mno-mmx -mno-sse + +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding) +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector) +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4)) export REALMODE_CFLAGS # BITS is used as extension for files which are available in a 32 bit
@@ -64,8 +75,10 @@ ifeq ($(CONFIG_X86_32),y) # with nonstandard options KBUILD_CFLAGS += -fno-pic - # prevent gcc from keeping the stack 16 byte aligned - KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) + # Align the stack to the register width instead of using the default + # alignment of 16 bytes. This reduces stack usage and the number of + # alignment instructions. + KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align4)) # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use # a lot more stack due to the lack of sharing of stacklots:
@@ -88,17 +101,23 @@ else KBUILD_CFLAGS += -m64 # Align jump targets to 1 byte, not the default 16 bytes: - KBUILD_CFLAGS += -falign-jumps=1 + KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1) # Pack loops tightly as well: - KBUILD_CFLAGS += -falign-loops=1 + KBUILD_CFLAGS += $(call cc-option,-falign-loops=1) # Don't autogenerate traditional x87 instructions KBUILD_CFLAGS += $(call cc-option,-mno-80387) KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) - # Use -mpreferred-stack-boundary=3 if supported. - KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) + # By default gcc and clang use a stack alignment of 16 bytes for x86. + # However the standard kernel entry on x86-64 leaves the stack on an + # 8-byte boundary. If the compiler isn't informed about the actual + # alignment it will generate extra alignment instructions for the + # default alignment which keep the stack *mis*aligned. + # Furthermore an alignment to the register width reduces stack usage + # and the number of alignment instructions. + KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align8)) # Use -mskip-rax-setup if supported. KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
arch/x86/boot/compressed/aslr.c +2 -1
@@ -1,5 +1,6 @@#include "misc.h" +#include <asm/asm.h> #include <asm/msr.h> #include <asm/archrandom.h> #include <asm/e820.h>
@@ -94,7 +95,7 @@ static unsigned long get_random_long(void) }/* Circular multiply for better bit diffusion */ - asm("mul %3" + asm(_ASM_MUL"%3" :"=a" (random),"=d" (raw) :"a" (random),"rm" (mix_const)); random += raw;
arch/x86/boot/string.c +9 -0
@@ -16,6 +16,15 @@#include "ctype.h" #include "string.h" +/* +* Undef these macros so that the functions that we provide +* here will have the correct names regardless of how string.h +* may have chosen to #define them. +*/ +#undef memcpy +#undef memset +#undef memcmp +int memcmp (const void *s1,const void *s2,size_t len) {u8 diff;
arch/x86/crypto/aes_ctrby8_avx-x86_64.S +2 -5
@@ -65,7 +65,6 @@ #include <linux/linkage.h> #include <asm/inst.h> -#define CONCAT(a,b) a##b #define VMOVDQ vmovdqu #define xdata0 %xmm0
@@ -92,8 +91,6 @@ #define num_bytes %r8 #define tmp %r10 -#define DDQ(i) CONCAT(ddq_add_,i) -#define XMM(i) CONCAT(%xmm, i) #define DDQ_DATA 0 #define XDATA 1 #define KEY_128 1
@@ -131,12 +128,12 @@ ddq_add_8: /* generate a unique variable for ddq_add_x */ .macro setddq n - var_ddq_add = DDQ(\n) + var_ddq_add = ddq_add_\n .endm /* generate a unique variable for xmm register */ .macro setxdata n - var_xdata = XMM(\n) + var_xdata = %xmm\n .endm /* club the numeric 'id' to the symbol 'name' */
arch/x86/include/asm/asm.h +1 -0
@@ -34,6 +34,7 @@#define _ASM_ADD __ASM_SIZE(add)#define _ASM_SUB __ASM_SIZE(sub)#define _ASM_XADD __ASM_SIZE(xadd) +#define _ASM_MUL __ASM_SIZE(mul)#define _ASM_AX __ASM_REG(ax)#define _ASM_BX __ASM_REG(bx)
drivers/acpi/acpi_platform.c +1 -0
@@ -29,6 +29,7 @@ static const struct acpi_device_id forbidden_id_list[] = { {"PNP0200", 0}, /* AT DMA Controller */ {"ACPI0009", 0}, /* IOxAPIC */ {"ACPI000A", 0}, /* IOAPIC */ + {"SMB0001", 0}, /* ACPI SMBUS virtual device */ {"", 0}, };
drivers/block/zram/zram_drv.c +6 -20
@@ -1184,6 +1184,11 @@ static struct attribute_group zram_disk_attr_group = { .attrs = zram_disk_attrs, }; +static const struct attribute_group *zram_disk_attr_groups[] = { + &zram_disk_attr_group, +NULL , +}; +/* * Allocate and initialize new zram device. the function returns * '>= 0' device_id upon success, and negative value otherwise.
@@ -1264,15 +1269,9 @@ static int zram_add(void) zram->disk->queue->limits.discard_zeroes_data =0 ;queue_flag_set_unlocked (QUEUE_FLAG_DISCARD , zram->disk->queue); +disk_to_dev (zram->disk)->groups = zram_disk_attr_groups;add_disk (zram->disk); - ret =sysfs_create_group (&disk_to_dev (zram->disk)->kobj, - &zram_disk_attr_group); -if (ret <0 ) { -pr_err ("Error creating sysfs group for device %d\n" , - device_id); - goto out_free_disk; - }strlcpy (zram->compressor, default_compressor,sizeof (zram->compressor)); zram->meta =NULL ; zram->max_comp_streams =1 ;
@@ -1280,9 +1279,6 @@ static int zram_add(void)pr_info ("Added device: %s\n" , zram->disk->disk_name);return device_id; -out_free_disk: -del_gendisk (zram->disk); -put_disk (zram->disk); out_free_queue:blk_cleanup_queue (queue); out_free_idr:
@@ -1310,16 +1306,6 @@ static int zram_remove(struct zram *zram) zram->claim = true;mutex_unlock (&bdev->bd_mutex); -/* -* Remove sysfs first, so no one will perform a disksize -* store while we destroy the devices. This also helps during -* hot_remove -- zram_reset_device() is the last holder of -* ->init_lock, no later/concurrent disksize_store() or any -* other sysfs handlers are possible. -*/ -sysfs_remove_group (&disk_to_dev (zram->disk)->kobj, - &zram_disk_attr_group); -/* Make sure all the pending I/O are finished */ fsync_bdev (bdev);zram_reset_device (zram);
drivers/bluetooth/Kconfig +0 -1
@@ -125,7 +125,6 @@ config BT_HCIUART_LL config BT_HCIUART_3WIRE bool "Three-wire UART (H5) protocol support" depends on BT_HCIUART - depends on BT_HCIUART_SERDEV help The HCI Three-wire UART Transport Layer makes it possible to user the Bluetooth HCI over a serial port interface. The HCI
drivers/clk/samsung/clk-exynos5420.c +1 -0
@@ -273,6 +273,7 @@ static const struct samsung_clk_reg_dump exynos5420_set_clksrc[] = { { .offset = GATE_BUS_TOP, .value = 0xffffffff, }, { .offset = GATE_BUS_DISP1, .value = 0xffffffff, }, { .offset = GATE_IP_PERIC, .value = 0xffffffff, }, + { .offset = GATE_IP_PERIS, .value = 0xffffffff, }, }; static int exynos5420_clk_suspend(void)
drivers/firmware/efi/libstub/Makefile +1 -1
@@ -10,7 +10,7 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -DDISABLE_BRANCH_PROFILING -cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) +cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ -fno-builtin -fpic -mno-single-pic-base
drivers/firmware/efi/libstub/arm64-stub.c +9 -1
@@ -9,9 +9,17 @@* published by the Free Software Foundation. * */ + +/* +* To prevent the compiler from emitting GOT-indirected (and thus absolute) +* references to the section markers, override their visibility as 'hidden' +*/ +#pragma GCC visibility push(hidden) +#include <asm/sections.h> +#pragma GCC visibility pop +#include <linux/efi.h> #include <asm/efi.h> -#include <asm/sections.h> efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table_arg, unsigned long *image_addr,
drivers/hid/uhid.c +13 -0
@@ -12,6 +12,7 @@#include <linux/atomic.h> #include <linux/compat.h> +#include <linux/cred.h> #include <linux/device.h> #include <linux/fs.h> #include <linux/hid.h>
@@ -24,6 +25,7 @@#include <linux/spinlock.h> #include <linux/uhid.h> #include <linux/wait.h> +#include <linux/uaccess.h> #define UHID_NAME "uhid"#define UHID_BUFSIZE 32
@@ -721,6 +723,17 @@ static ssize_t uhid_char_write(struct file *file, const char __user *buffer,switch (uhid->input_buf.type) {case UHID_CREATE : +/* +* 'struct uhid_create_req' contains a __user pointer which is +* copied from, so it's unsafe to allow this with elevated +* privileges (e.g. from a setuid binary) or via kernel_write(). +*/ +if (file->f_cred !=current_cred () ||uaccess_kernel ()) { +pr_err_once ("UHID_CREATE from different security context by process %d (%s), this is not allowed.\n" , +task_tgid_vnr (current), current->comm); + ret = -EACCES ; + goto unlock; + } ret =uhid_dev_create (uhid, &uhid->input_buf);break ;case UHID_CREATE2 :
drivers/hwmon/ibmpowernv.c +3 -4
@@ -114,7 +114,7 @@ static ssize_t show_label(struct device *dev, struct device_attribute *devattr,return sprintf (buf,"%s\n" , sdata->label); } -static int __init get_logical_cpu (int hwcpu) +static int get_logical_cpu (int hwcpu) {int cpu;
@@ -125,9 +125,8 @@ static int __init get_logical_cpu(int hwcpu)return -ENOENT ; } -static void __init make_sensor_label (struct device_node *np, -struct sensor_data *sdata, -const char *label) +static void make_sensor_label (struct device_node *np, +struct sensor_data *sdata,const char *label) {u32 id;size_t n;
drivers/media/v4l2-core/v4l2-event.c +24 -19
78 lines not on this page · raw message
drivers/media/v4l2-core/videobuf2-core.c +3 -6
@@ -870,12 +870,9 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)dprintk (4 ,"done processing on buffer %d, state: %d\n" , vb->index, state); -if (state !=VB2_BUF_STATE_QUEUED && - state !=VB2_BUF_STATE_REQUEUEING ) { -/* sync buffers */ -for (plane =0 ; plane < vb->num_planes; ++plane) -call_void_memop (vb, finish, vb->planes[plane].mem_priv); - } +/* sync buffers */ +for (plane =0 ; plane < vb->num_planes; ++plane) +call_void_memop (vb, finish, vb->planes[plane].mem_priv);spin_lock_irqsave (&q->done_lock, flags); if (state == VB2_BUF_STATE_QUEUED ||
drivers/misc/atmel-ssc.c +1 -1
@@ -129,7 +129,7 @@ static const struct of_device_id atmel_ssc_dt_ids[] = {MODULE_DEVICE_TABLE (of, atmel_ssc_dt_ids);#endif -static inline const struct atmel_ssc_platform_data *__init +static inline const struct atmel_ssc_platform_data *atmel_ssc_get_driver_data (struct platform_device *pdev) {if (pdev->dev.of_node) {
drivers/misc/sgi-gru/grukdump.c +4 -0
@@ -27,6 +27,9 @@#include <linux/delay.h> #include <linux/bitops.h> #include <asm/uv/uv_hub.h> + +#include <linux/nospec.h> +#include "gru.h" #include "grutables.h" #include "gruhandles.h"
@@ -196,6 +199,7 @@ int gru_dump_chiplet_request(unsigned long arg)/* Currently, only dump by gid is implemented */ if (req.gid >= gru_max_gids)return -EINVAL ; + req.gid =array_index_nospec (req.gid, gru_max_gids); gru =GID_TO_GRU (req.gid); ubuf = req.buf;
drivers/net/ethernet/broadcom/tg3.c +16 -2
@@ -12379,6 +12379,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e {struct tg3 *tp =netdev_priv (dev);int i, irq_sync =0 , err =0 ; +bool reset_phy = false; if ((ering->rx_pending > tp->rx_std_ring_mask) || (ering->rx_jumbo_pending > tp->rx_jmb_ring_mask) ||
@@ -12410,7 +12411,13 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *eif (netif_running (dev)) {tg3_halt (tp,RESET_KIND_SHUTDOWN ,1 ); - err =tg3_restart_hw (tp, false); +/* Reset PHY to avoid PHY lock up */ +if (tg3_asic_rev (tp) ==ASIC_REV_5717 || +tg3_asic_rev (tp) ==ASIC_REV_5719 || +tg3_asic_rev (tp) ==ASIC_REV_5720 ) + reset_phy = true; + + err =tg3_restart_hw (tp, reset_phy);if (!err)tg3_netif_start (tp); }
@@ -12444,6 +12451,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam {struct tg3 *tp =netdev_priv (dev);int err =0 ; +bool reset_phy = false;if (tp->link_config.autoneg ==AUTONEG_ENABLE )tg3_warn_mgmt_link_flap (tp);
@@ -12534,7 +12542,13 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparamif (netif_running (dev)) {tg3_halt (tp,RESET_KIND_SHUTDOWN ,1 ); - err =tg3_restart_hw (tp, false); +/* Reset PHY to avoid PHY lock up */ +if (tg3_asic_rev (tp) ==ASIC_REV_5717 || +tg3_asic_rev (tp) ==ASIC_REV_5719 || +tg3_asic_rev (tp) ==ASIC_REV_5720 ) + reset_phy = true; + + err =tg3_restart_hw (tp, reset_phy);if (!err)tg3_netif_start (tp); }
drivers/platform/x86/acerhdf.c +1 -0
@@ -233,6 +233,7 @@ static const struct bios_settings bios_tbl[] = { {"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x9e, 0x00}, 0}, {"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x9e, 0x00}, 0}, {"Gateway", "LT31", "v1.3303t", 0x55, 0x58, {0x9e, 0x00}, 0}, + {"Gateway", "LT31", "v1.3307", 0x55, 0x58, {0x9e, 0x00}, 0},/* Packard Bell */ {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00}, 0}, {"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00}, 0},
drivers/uio/uio.c +5 -2
@@ -842,6 +842,8 @@ int __uio_register_device(struct module *owner,if (ret) goto err_uio_dev_add_attributes; + info->uio_dev = idev; +if (info->irq && (info->irq !=UIO_IRQ_CUSTOM )) {/* * Note that we deliberately don't use devm_request_irq
@@ -853,11 +855,12 @@ int __uio_register_device(struct module *owner,*/ ret =request_irq (info->irq, uio_interrupt, info->irq_flags, info->name, idev); -if (ret) +if (ret) { + info->uio_dev =NULL ; goto err_request_irq; + } } - info->uio_dev = idev;return 0 ; err_request_irq:
drivers/usb/class/cdc-acm.c +3 -0
@@ -1716,6 +1716,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */ .driver_info =NO_UNION_NORMAL ,/* has no union descriptor */ }, + { USB_DEVICE(0x0572, 0x1349), /* Hiro (Conexant) USB MODEM H50228 */ + .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ + }, { USB_DEVICE(0x20df, 0x0001), /* Simtec Electronics Entropy Key */ .driver_info = QUIRK_CONTROL_LINE_STATE, }, { USB_DEVICE(0x2184, 0x001c) }, /* GW Instek AFG-2225 */
drivers/usb/core/quirks.c +8 -0
@@ -243,6 +243,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT | USB_QUIRK_DELAY_CTRL_MSG }, + /* Corsair K70 LUX RGB */ + { USB_DEVICE(0x1b1c, 0x1b33), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Corsair K70 LUX */ { USB_DEVICE(0x1b1c, 0x1b36), .driver_info = USB_QUIRK_DELAY_INIT },
@@ -263,6 +266,11 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x2040, 0x7200), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* Raydium Touchscreen */ + { USB_DEVICE(0x2386, 0x3114), .driver_info = USB_QUIRK_NO_LPM }, + + { USB_DEVICE(0x2386, 0x3119), .driver_info = USB_QUIRK_NO_LPM }, + /* DJI CineSSD */ { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
drivers/usb/host/xhci-hub.c +1 -1
@@ -348,7 +348,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, slot_id =0 ;for (i =0 ; i <MAX_HC_SLOTS ; i++) { -if (!xhci->devs[i]) +if (!xhci->devs[i] || !xhci->devs[i]->udev)continue ; speed = xhci->devs[i]->udev->speed; if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3))
drivers/usb/misc/appledisplay.c +1 -0
@@ -63,6 +63,7 @@ static const struct usb_device_id appledisplay_table[] = { { APPLEDISPLAY_DEVICE(0x9219) }, { APPLEDISPLAY_DEVICE(0x921c) }, { APPLEDISPLAY_DEVICE(0x921d) }, + { APPLEDISPLAY_DEVICE(0x9222) }, { APPLEDISPLAY_DEVICE(0x9236) },/* Terminating entry */
fs/btrfs/disk-io.c +15 -4
@@ -4333,6 +4333,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,static int btrfs_destroy_pinned_extent (struct btrfs_root *root,struct extent_io_tree *pinned_extents) { +struct btrfs_fs_info *fs_info = root->fs_info;struct extent_io_tree *unpin;u64 start;u64 end;
@@ -4342,21 +4343,31 @@ static int btrfs_destroy_pinned_extent(struct btrfs_root *root, unpin = pinned_extents; again:while (1 ) { +/* +* The btrfs_finish_extent_commit() may get the same range as +* ours between find_first_extent_bit and clear_extent_dirty. +* Hence, hold the unused_bg_unpin_mutex to avoid double unpin +* the same extent range. +*/ +mutex_lock (&fs_info->unused_bg_unpin_mutex); ret =find_first_extent_bit (unpin,0 , &start, &end,EXTENT_DIRTY ,NULL ); -if (ret) +if (ret) { +mutex_unlock (&fs_info->unused_bg_unpin_mutex);break ; + }clear_extent_dirty (unpin, start, end,GFP_NOFS );btrfs_error_unpin_extent_range (root, start, end); +mutex_unlock (&fs_info->unused_bg_unpin_mutex);cond_resched (); }if (loop) { -if (unpin == &root->fs_info->freed_extents[0 ]) - unpin = &root->fs_info->freed_extents[1 ]; +if (unpin == &fs_info->freed_extents[0 ]) + unpin = &fs_info->freed_extents[1 ];else - unpin = &root->fs_info->freed_extents[0 ]; + unpin = &fs_info->freed_extents[0 ]; loop = false; goto again; }
fs/exofs/super.c +4 -1
@@ -100,6 +100,7 @@ static int parse_options(char *options, struct exofs_mountopt *opts) token =match_token (p, tokens, args);switch (token) {case Opt_name: +kfree (opts->dev_name); opts->dev_name =match_strdup (&args[0 ]);if (unlikely (!opts->dev_name)) {EXOFS_ERR ("Error allocating dev_name" );
@@ -868,8 +869,10 @@ static struct dentry *exofs_mount(struct file_system_type *type,int ret; ret =parse_options (data, &opts); -if (ret) +if (ret) { +kfree (opts.dev_name);return ERR_PTR (ret); + }if (!opts.dev_name) opts.dev_name = dev_name;
fs/gfs2/rgrp.c +2 -1
@@ -732,6 +732,7 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)spin_lock (&gl->gl_lockref.lock); gl->gl_object =NULL ;spin_unlock (&gl->gl_lockref.lock); +gfs2_rgrp_brelse (rgd);gfs2_glock_add_to_lru (gl);gfs2_glock_put (gl); }
@@ -1139,7 +1140,7 @@ static u32 count_unlinked(struct gfs2_rgrpd *rgd)* @rgd: the struct gfs2_rgrpd describing the RG to read in * * Read in all of a Resource Group's header and bitmap blocks. -* Caller must eventually call gfs2_rgrp_relse() to free the bitmaps. +* Caller must eventually call gfs2_rgrp_brelse() to free the bitmaps. * * Returns: errno */
fs/hfs/brec.c +4 -0
@@ -424,6 +424,10 @@ skip:if (new_node) {__be32 cnid; +if (!new_node->parent) { +hfs_btree_inc_height (tree); + new_node->parent = tree->root; + } fd->bnode =hfs_bnode_find (tree, new_node->parent);/* create index key and entry */ hfs_bnode_read_key (new_node, fd->search_key,14 );
fs/hfsplus/brec.c +4 -0
@@ -427,6 +427,10 @@ skip:if (new_node) {__be32 cnid; +if (!new_node->parent) { +hfs_btree_inc_height (tree); + new_node->parent = tree->root; + } fd->bnode =hfs_bnode_find (tree, new_node->parent);/* create index key and entry */ hfs_bnode_read_key (new_node, fd->search_key,14 );
fs/reiserfs/xattr.c +7 -0
@@ -184,6 +184,7 @@ struct reiserfs_dentry_buf {struct dir_context ctx;struct dentry *xadir;int count; +int err;struct dentry *dentries[8 ]; };
@@ -206,6 +207,7 @@ fill_with_dentries(struct dir_context *ctx, const char *name, int namelen, dentry =lookup_one_len (name, dbuf->xadir, namelen);if (IS_ERR (dentry)) { + dbuf->err =PTR_ERR (dentry);return PTR_ERR (dentry); }else if (d_really_is_negative (dentry)) {/* A directory entry exists, but no file? */
@@ -214,6 +216,7 @@ fill_with_dentries(struct dir_context *ctx, const char *name, int namelen,"not found for file %pd.\n" , dentry, dbuf->xadir);dput (dentry); + dbuf->err = -EIO ;return -EIO ; }
@@ -261,6 +264,10 @@ static int reiserfs_for_each_xattr(struct inode *inode, err =reiserfs_readdir_inode (d_inode (dir), &buf.ctx);if (err)break ; +if (buf.err) { + err = buf.err; +break ; + }if (!buf.count)break ;for (i =0 ; !err && i < buf.count && buf.dentries[i]; i++) {
include/linux/kbuild.h +3 -3
@@ -2,14 +2,14 @@#define __LINUX_KBUILD_H#define DEFINE (sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) -#define BLANK () asm volatile("\n->" : : ) +#define BLANK () asm volatile("\n.ascii \"->\"" : : )#define OFFSET (sym, str, mem) \ DEFINE(sym, offsetof(struct str, mem))#define COMMENT (x) \ - asm volatile("\n->#" x) + asm volatile("\n.ascii \"->#" x "\"")#endif
include/linux/module.h +2 -2
@@ -125,13 +125,13 @@ extern void cleanup_module(void);/* Each module must use one module_init(). */ #define module_init (initfn) \ - static inline initcall_t __inittest(void) \ + static inline initcall_t __maybe_unused __inittest(void) \ { return initfn; } \ int init_module(void) __attribute__((alias(#initfn)));/* This is only required if you want to be unloadable. */ #define module_exit (exitfn) \ - static inline exitcall_t __exittest(void) \ + static inline exitcall_t __maybe_unused __exittest(void) \ { return exitfn; } \ void cleanup_module(void) __attribute__((alias(#exitfn)));
include/linux/netfilter/ipset/ip_set_comment.h +2 -2
@@ -41,11 +41,11 @@ ip_set_init_comment(struct ip_set_comment *comment,rcu_assign_pointer (comment->c, c); } -/* Used only when dumping a set, protected by rcu_read_lock_bh() */ +/* Used only when dumping a set, protected by rcu_read_lock() */ static inline int ip_set_put_comment (struct sk_buff *skb,struct ip_set_comment *comment) { -struct ip_set_comment_rcu *c =rcu_dereference_bh (comment->c); +struct ip_set_comment_rcu *c =rcu_dereference (comment->c);if (!c)return 0 ;
include/linux/uaccess.h +3 -0
@@ -2,6 +2,9 @@#define __LINUX_UACCESS_H__#include <linux/sched.h> + +#define uaccess_kernel () segment_eq(get_fs(), KERNEL_DS) +#include <asm/uaccess.h> static __always_inline void pagefault_disabled_inc(void)
lib/raid6/test/Makefile +2 -2
@@ -26,7 +26,7 @@ ifeq ($(ARCH),arm) CFLAGS += -I../../../arch/arm/include -mfpu=neon HAS_NEON = yes endif -ifeq ($(ARCH),arm64) +ifeq ($(ARCH),aarch64) CFLAGS += -I../../../arch/arm64/include HAS_NEON = yes endif
@@ -37,7 +37,7 @@ ifeq ($(IS_X86),yes) gcc -c -x assembler - >&/dev/null && \ rm ./-.o && echo -DCONFIG_AS_AVX2=1) else ifeq ($(HAS_NEON),yes) - OBJS += neon.o neon1.o neon2.o neon4.o neon8.o + OBJS += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 else HAS_ALTIVEC := $(shell printf '\#include <altivec.h>\nvector int a;\n' |\
net/core/dev.c +4 -0
@@ -4481,6 +4481,10 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) skb->vlan_tci =0 ; skb->dev = napi->dev; skb->skb_iif =0 ; + +/* eth_type_trans() assumes pkt_type is PACKET_HOST */ + skb->pkt_type =PACKET_HOST ; + skb->encapsulation =0 ;skb_shinfo (skb)->gso_type =0 ; skb->truesize =SKB_TRUESIZE (skb_end_offset (skb));
net/core/flow_dissector.c +2 -2
@@ -480,8 +480,8 @@ ip_proto_again:break ; } -if (dissector_uses_key (flow_dissector, -FLOW_DISSECTOR_KEY_PORTS )) { +if (dissector_uses_key (flow_dissector,FLOW_DISSECTOR_KEY_PORTS ) && + !(key_control->flags &FLOW_DIS_IS_FRAGMENT )) { key_ports =skb_flow_dissector_target (flow_dissector,FLOW_DISSECTOR_KEY_PORTS , target_container);
net/ipv4/ip_tunnel_core.c +1 -1
@@ -71,7 +71,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, iph->version =4 ; iph->ihl =sizeof (struct iphdr ) >>2 ; - iph->frag_off = df; + iph->frag_off =ip_mtu_locked (&rt->dst) ?0 : df; iph->protocol = proto; iph->tos = tos; iph->daddr = dst;
net/ipv6/route.c +6 -2
@@ -1420,8 +1420,12 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu);void ip6_sk_update_pmtu (struct sk_buff *skb,struct sock *sk,__be32 mtu) { -ip6_update_pmtu (skb,sock_net (sk), mtu, - sk->sk_bound_dev_if, sk->sk_mark); +int oif = sk->sk_bound_dev_if; + +if (!oif && skb->dev) + oif =l3mdev_master_ifindex (skb->dev); + +ip6_update_pmtu (skb,sock_net (sk), mtu, oif, sk->sk_mark); }EXPORT_SYMBOL_GPL (ip6_sk_update_pmtu);
net/netfilter/ipset/ip_set_hash_netportnet.c +4 -4
@@ -213,13 +213,13 @@ hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[],if (tb[IPSET_ATTR_CIDR ]) { e.cidr[0 ] =nla_get_u8 (tb[IPSET_ATTR_CIDR ]); -if (!e.cidr[0 ] || e.cidr[0 ] >HOST_MASK ) +if (e.cidr[0 ] >HOST_MASK )return -IPSET_ERR_INVALID_CIDR ; }if (tb[IPSET_ATTR_CIDR2 ]) { e.cidr[1 ] =nla_get_u8 (tb[IPSET_ATTR_CIDR2 ]); -if (!e.cidr[1 ] || e.cidr[1 ] >HOST_MASK ) +if (e.cidr[1 ] >HOST_MASK )return -IPSET_ERR_INVALID_CIDR ; }
@@ -492,13 +492,13 @@ hash_netportnet6_uadt(struct ip_set *set, struct nlattr *tb[],if (tb[IPSET_ATTR_CIDR ]) { e.cidr[0 ] =nla_get_u8 (tb[IPSET_ATTR_CIDR ]); -if (!e.cidr[0 ] || e.cidr[0 ] >HOST_MASK ) +if (e.cidr[0 ] >HOST_MASK )return -IPSET_ERR_INVALID_CIDR ; }if (tb[IPSET_ATTR_CIDR2 ]) { e.cidr[1 ] =nla_get_u8 (tb[IPSET_ATTR_CIDR2 ]); -if (!e.cidr[1 ] || e.cidr[1 ] >HOST_MASK ) +if (e.cidr[1 ] >HOST_MASK )return -IPSET_ERR_INVALID_CIDR ; }
net/netfilter/xt_IDLETIMER.c +20 -0
@@ -116,6 +116,22 @@ static void idletimer_tg_expired(unsigned long data)schedule_work (&timer->work); } +static int idletimer_check_sysfs_name (const char *name,unsigned int size) +{ +int ret; + + ret =xt_check_proc_name (name, size); +if (ret <0 ) +return ret; + +if (!strcmp (name,"power" ) || + !strcmp (name,"subsystem" ) || + !strcmp (name,"uevent" )) +return -EINVAL ; + +return 0 ; +} +static int idletimer_tg_create (struct idletimer_tg_info *info) {int ret;
@@ -126,6 +142,10 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) goto out; } + ret =idletimer_check_sysfs_name (info->label,sizeof (info->label)); +if (ret <0 ) + goto out_free_timer; +sysfs_attr_init (&info->timer->attr.attr); info->timer->attr.attr.name =kstrdup (info->label,GFP_KERNEL );if (!info->timer->attr.attr.name) {
net/sunrpc/xdr.c +1 -1
@@ -512,7 +512,7 @@ EXPORT_SYMBOL_GPL(xdr_commit_encode);static __be32 *xdr_get_next_encode_buffer (struct xdr_stream *xdr,size_t nbytes) { -static __be32 *p; +__be32 *p;int space_left;int frag1bytes, frag2bytes;
scripts/Kbuild.include +12 -6
@@ -108,16 +108,21 @@ as-option = $(call try-run,\ as-instr = $(call try-run,\ printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) +# __cc-option +# Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586) +__cc-option = $(call try-run,\ + $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4)) + # cc-option # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) -cc-option = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) +cc-option = $(call __cc-option, $(CC),\ + $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2)) # cc-option-yn # Usage: flag := $(call cc-option-yn,-march=winchip-c6) cc-option-yn = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) # cc-option-align # Prefix align with either -falign or -malign
@@ -127,7 +132,7 @@ cc-option-align = $(subst -functions=0,,\ # cc-disable-warning # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) # cc-name # Expands to either gcc or clang
@@ -147,12 +152,13 @@ cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) # cc-ldoption # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) cc-ldoption = $(call try-run,\ - $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) + $(CC) $(1) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) # ld-option # Usage: LDFLAGS += $(call ld-option, -X) ld-option = $(call try-run,\ - $(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) + $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \ + $(LD) $(LDFLAGS) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) # ar-option # Usage: KBUILD_ARFLAGS := $(call ar-option,D)
scripts/Makefile.build +8 -0
@@ -175,6 +175,14 @@ cmd_cc_symtypes_c = \ $(obj)/%.symtypes : $(src)/%.c FORCE $(call cmd,cc_symtypes_c) +# LLVM assembly +# Generate .ll files from .c +quiet_cmd_cc_ll_c = CC $(quiet_modtag) $@ + cmd_cc_ll_c = $(CC) $(c_flags) -emit-llvm -S -o $@ $< + +$(obj)/%.ll: $(src)/%.c FORCE + $(call if_changed_dep,cc_ll_c) + # C (.c) files # The C file is compiled and updated dependency information is generated. # (See cmd_cc_o_c + relevant part of rule_cc_o_c)
scripts/Makefile.extrawarn +0 -1
@@ -61,7 +61,6 @@ ifeq ($(cc-name),clang) KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides) KBUILD_CFLAGS += $(call cc-disable-warning, unused-value) KBUILD_CFLAGS += $(call cc-disable-warning, format) -KBUILD_CFLAGS += $(call cc-disable-warning, unknown-warning-option) KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
scripts/Makefile.lib +31 -0
@@ -388,3 +388,34 @@ quiet_cmd_xzmisc = XZMISC $@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ xz --check=crc32 --lzma2=dict=1MiB) > $@ || \ (rm -f $@ ; false) + +# ASM offsets +# --------------------------------------------------------------------------- + +# Default sed regexp - multiline due to syntax constraints +# +# Use [:space:] because LLVM's integrated assembler inserts <tab> around +# the .ascii directive whereas GCC keeps the <space> as-is. +define sed-offsets + 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \ + /^->/{s:->#\(.*\):/* \1 */:; \ + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:->::; p;}' +endef + +# Use filechk to avoid rebuilds when a header changes, but the resulting file +# does not +define filechk_offsets + (set -e; \ + echo "#ifndef $2"; \ + echo "#define $2"; \ + echo "/*"; \ + echo " * DO NOT MODIFY."; \ + echo " *"; \ + echo " * This file was generated by Kbuild"; \ + echo " */"; \ + echo ""; \ + sed -ne $(sed-offsets); \ + echo ""; \ + echo "#endif" ) +endef
scripts/mod/Makefile +2 -26
@@ -5,32 +5,8 @@ modpost-objs := modpost.o file2alias.o sumversion.o devicetable-offsets-file := devicetable-offsets.h -define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" -endef - -quiet_cmd_offsets = GEN $@ -define cmd_offsets - (set -e; \ - echo "#ifndef __DEVICETABLE_OFFSETS_H__"; \ - echo "#define __DEVICETABLE_OFFSETS_H__"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y) $<; \ - echo ""; \ - echo "#endif" ) > $@ -endef - -$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s - $(call if_changed,offsets) +$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE + $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__) targets += $(devicetable-offsets-file) devicetable-offsets.s