Re: Linux 3.18.69
diff --git a/Makefile b/Makefile index 0d7f1e91e910..49237a0442cd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 68 +SUBLEVEL = 69 EXTRAVERSION = NAME = Diseased Newt diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 3dca15634e69..7b4e9ea0b1a4 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -156,8 +156,11 @@ void fpsimd_thread_switch(struct task_struct *next) void fpsimd_flush_thread(void) { + preempt_disable(); memset(>thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); + fpsimd_flush_task_state(current); set_thread_flag(TIF_FOREIGN_FPSTATE); + preempt_enable(); } /* diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 6094c64b3380..df0f5347029f 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -253,8 +253,11 @@ retry: * signal first. We do not need to release the mmap_sem because it * would already be released in __lock_page_or_retry in mm/filemap.c. */ - if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) + if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) { + if (!user_mode(regs)) + goto no_context; return 0; + } /* * Major/minor page fault accounting is only done on the initial diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 0c33a7c67ea5..a950864a64da 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -260,7 +260,7 @@ static void handle_relocations(void *output, unsigned long output_len) /* * Process relocations: 32 bit relocations first then 64 bit after. -* Two sets of binary relocations are added to the end of the kernel +* Three sets of binary relocations are added to the end of the kernel * before compression. Each relocation table entry is the kernel * address of the location which needs to be updated stored as a * 32-bit value which is sign extended to 64 bits. @@ -270,6 +270,8 @@ static void handle_relocations(void *output, unsigned long output_len) * kernel bits... * 0 - zero terminator for 64 bit relocations * 64 bit relocation repeated +* 0 - zero terminator for inverse 32 bit relocations +* 32 bit inverse relocation repeated * 0 - zero terminator for 32 bit relocations * 32 bit relocation repeated * @@ -286,6 +288,16 @@ static void handle_relocations(void *output, unsigned long output_len) *(uint32_t *)ptr += delta; } #ifdef CONFIG_X86_64 + while (*--reloc) { + long extended = *reloc; + extended += map; + + ptr = (unsigned long)extended; + if (ptr < min_addr || ptr > max_addr) + error("inverse 32-bit relocation outside of kernel!\n"); + + *(int32_t *)ptr -= delta; + } for (reloc--; *reloc; reloc--) { long extended = *reloc; extended += map; diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index b8237d8a1e0c..a882087d34f2 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -297,13 +297,13 @@ static inline unsigned type in##bwl##_p(int port) \ static inline void outs##bwl(int port, const void *addr, unsigned long count) \ { \ asm volatile("rep; outs" #bwl \ -: "+S"(addr), "+c"(count) : "d"(port));\ +: "+S"(addr), "+c"(count) : "d"(port) : "memory"); \ } \ \ static inline void ins##bwl(int port, void *addr, unsigned long count) \ { \ asm volatile("rep; ins" #bwl\ -: "+D"(addr), "+c"(count) : "d"(port));\ +: "+D"(addr), "+c"(count) : "d"(port) : "memory"); \ } BUILDIO(b, b, char) diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index a5efb21d5228..73eb7fd4aec4 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c @@ -20,7 +20,10 @@ struct relocs { static struct relocs relocs16; static struct relocs relocs32; +#if ELF_BITS == 64 +static struct relocs relocs32neg; static struct relocs relocs64; +#endif struct section { Elf_Shdr shdr; @@ -762,11 +765,16 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym, switch (r_type) { case R_X86_64_NONE: + /* NONE can be ignored. */ +
Linux 3.18.69
I'm announcing the release of the 3.18.69 kernel. All users of the 3.18 kernel series must upgrade. The updated 3.18.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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 Makefile|2 - arch/arm64/kernel/fpsimd.c |3 + arch/arm64/mm/fault.c |5 ++- arch/x86/boot/compressed/misc.c | 14 arch/x86/include/asm/io.h |4 +- arch/x86/tools/relocs.c | 39 +--- drivers/base/dma-contiguous.c |2 - drivers/clk/clk-si5351.c| 10 +++--- drivers/net/wireless/p54/fwio.c |2 - drivers/scsi/isci/remote_node_context.c |3 + drivers/scsi/sg.c | 49 +- include/linux/bitmap.h | 36 +++--- include/linux/cma.h | 13 include/linux/dma-contiguous.h |4 +- kernel/gcov/base.c | 12 +++ kernel/gcov/gcc_4_7.c |6 +++ lib/bitmap.c| 24 -- mm/cma.c| 52 mm/page_alloc.c |6 ++- sound/pci/au88x0/au88x0_core.c | 14 +++- 20 files changed, 208 insertions(+), 92 deletions(-) Ard Biesheuvel (1): arm64: flush FP/SIMD state correctly after execve() Arnd Bergmann (2): scsi: isci: avoid array subscript warning x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl Danesh Petigara (1): mm: cma: fix CMA aligned offset calculation Dave Martin (1): arm64: fpsimd: Prevent registers leaking across exec Florian Meier (1): gcov: add support for gcc version >= 6 George G. Davis (1): mm: cma: fix totalcma_pages to include DT defined CMA regions Greg Kroah-Hartman (1): Linux 3.18.69 Gregory Fong (1): mm: cma: align to physical address, not CMA region position Hannes Reinecke (2): scsi: sg: protect accesses to 'reserved' page array scsi: sg: reset 'res_in_use' after unlinking reserved array Jan Beulich (1): x86-64: Handle PC-relative relocations on per-CPU data Jiri Slaby (1): p54: memset(0) whole array Krzysztof Kozlowski (1): clk: si5351: Constify clock names and struct regmap_config Lorenzo Stoakes (1): gcov: add support for GCC 5.1 Mark Rutland (1): arm64: mm: abort uaccess retries upon fatal signal Markus Trippelsdorf (1): x86/tools: Fix gcc-7 warning in relocs.c Martin Liska (1): gcov: support GCC 7.1 Michal Nazarewicz (1): lib: bitmap: add alignment offset for bitmap_find_next_zero_area() Pintu Kumar (1): mm: cma: split cma-reserved in dmesg log Rohit Vaswani (1): mm: cma: fix incorrect type conversion for size during dma allocation Sasha Levin (1): mm: cma: constify and use correct signness in mm/cma.c Takashi Iwai (1): ALSA: au88x0: Fix zero clear of stream->resources Thierry Reding (1): mm/cma: make kmemleak ignore CMA regions signature.asc Description: PGP signature
Linux 3.18.69
I'm announcing the release of the 3.18.69 kernel. All users of the 3.18 kernel series must upgrade. The updated 3.18.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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 Makefile|2 - arch/arm64/kernel/fpsimd.c |3 + arch/arm64/mm/fault.c |5 ++- arch/x86/boot/compressed/misc.c | 14 arch/x86/include/asm/io.h |4 +- arch/x86/tools/relocs.c | 39 +--- drivers/base/dma-contiguous.c |2 - drivers/clk/clk-si5351.c| 10 +++--- drivers/net/wireless/p54/fwio.c |2 - drivers/scsi/isci/remote_node_context.c |3 + drivers/scsi/sg.c | 49 +- include/linux/bitmap.h | 36 +++--- include/linux/cma.h | 13 include/linux/dma-contiguous.h |4 +- kernel/gcov/base.c | 12 +++ kernel/gcov/gcc_4_7.c |6 +++ lib/bitmap.c| 24 -- mm/cma.c| 52 mm/page_alloc.c |6 ++- sound/pci/au88x0/au88x0_core.c | 14 +++- 20 files changed, 208 insertions(+), 92 deletions(-) Ard Biesheuvel (1): arm64: flush FP/SIMD state correctly after execve() Arnd Bergmann (2): scsi: isci: avoid array subscript warning x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl Danesh Petigara (1): mm: cma: fix CMA aligned offset calculation Dave Martin (1): arm64: fpsimd: Prevent registers leaking across exec Florian Meier (1): gcov: add support for gcc version >= 6 George G. Davis (1): mm: cma: fix totalcma_pages to include DT defined CMA regions Greg Kroah-Hartman (1): Linux 3.18.69 Gregory Fong (1): mm: cma: align to physical address, not CMA region position Hannes Reinecke (2): scsi: sg: protect accesses to 'reserved' page array scsi: sg: reset 'res_in_use' after unlinking reserved array Jan Beulich (1): x86-64: Handle PC-relative relocations on per-CPU data Jiri Slaby (1): p54: memset(0) whole array Krzysztof Kozlowski (1): clk: si5351: Constify clock names and struct regmap_config Lorenzo Stoakes (1): gcov: add support for GCC 5.1 Mark Rutland (1): arm64: mm: abort uaccess retries upon fatal signal Markus Trippelsdorf (1): x86/tools: Fix gcc-7 warning in relocs.c Martin Liska (1): gcov: support GCC 7.1 Michal Nazarewicz (1): lib: bitmap: add alignment offset for bitmap_find_next_zero_area() Pintu Kumar (1): mm: cma: split cma-reserved in dmesg log Rohit Vaswani (1): mm: cma: fix incorrect type conversion for size during dma allocation Sasha Levin (1): mm: cma: constify and use correct signness in mm/cma.c Takashi Iwai (1): ALSA: au88x0: Fix zero clear of stream->resources Thierry Reding (1): mm/cma: make kmemleak ignore CMA regions signature.asc Description: PGP signature
Re: Linux 3.18.69
diff --git a/Makefile b/Makefile index 0d7f1e91e910..49237a0442cd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 68 +SUBLEVEL = 69 EXTRAVERSION = NAME = Diseased Newt diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 3dca15634e69..7b4e9ea0b1a4 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -156,8 +156,11 @@ void fpsimd_thread_switch(struct task_struct *next) void fpsimd_flush_thread(void) { + preempt_disable(); memset(>thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); + fpsimd_flush_task_state(current); set_thread_flag(TIF_FOREIGN_FPSTATE); + preempt_enable(); } /* diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 6094c64b3380..df0f5347029f 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -253,8 +253,11 @@ retry: * signal first. We do not need to release the mmap_sem because it * would already be released in __lock_page_or_retry in mm/filemap.c. */ - if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) + if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) { + if (!user_mode(regs)) + goto no_context; return 0; + } /* * Major/minor page fault accounting is only done on the initial diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 0c33a7c67ea5..a950864a64da 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -260,7 +260,7 @@ static void handle_relocations(void *output, unsigned long output_len) /* * Process relocations: 32 bit relocations first then 64 bit after. -* Two sets of binary relocations are added to the end of the kernel +* Three sets of binary relocations are added to the end of the kernel * before compression. Each relocation table entry is the kernel * address of the location which needs to be updated stored as a * 32-bit value which is sign extended to 64 bits. @@ -270,6 +270,8 @@ static void handle_relocations(void *output, unsigned long output_len) * kernel bits... * 0 - zero terminator for 64 bit relocations * 64 bit relocation repeated +* 0 - zero terminator for inverse 32 bit relocations +* 32 bit inverse relocation repeated * 0 - zero terminator for 32 bit relocations * 32 bit relocation repeated * @@ -286,6 +288,16 @@ static void handle_relocations(void *output, unsigned long output_len) *(uint32_t *)ptr += delta; } #ifdef CONFIG_X86_64 + while (*--reloc) { + long extended = *reloc; + extended += map; + + ptr = (unsigned long)extended; + if (ptr < min_addr || ptr > max_addr) + error("inverse 32-bit relocation outside of kernel!\n"); + + *(int32_t *)ptr -= delta; + } for (reloc--; *reloc; reloc--) { long extended = *reloc; extended += map; diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index b8237d8a1e0c..a882087d34f2 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -297,13 +297,13 @@ static inline unsigned type in##bwl##_p(int port) \ static inline void outs##bwl(int port, const void *addr, unsigned long count) \ { \ asm volatile("rep; outs" #bwl \ -: "+S"(addr), "+c"(count) : "d"(port));\ +: "+S"(addr), "+c"(count) : "d"(port) : "memory"); \ } \ \ static inline void ins##bwl(int port, void *addr, unsigned long count) \ { \ asm volatile("rep; ins" #bwl\ -: "+D"(addr), "+c"(count) : "d"(port));\ +: "+D"(addr), "+c"(count) : "d"(port) : "memory"); \ } BUILDIO(b, b, char) diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index a5efb21d5228..73eb7fd4aec4 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c @@ -20,7 +20,10 @@ struct relocs { static struct relocs relocs16; static struct relocs relocs32; +#if ELF_BITS == 64 +static struct relocs relocs32neg; static struct relocs relocs64; +#endif struct section { Elf_Shdr shdr; @@ -762,11 +765,16 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym, switch (r_type) { case R_X86_64_NONE: + /* NONE can be ignored. */ +