android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Joerg Roedel 697bd3e4aa x86, vmlinux.lds: Page-align end of ..page_aligned sections
commit de2b41be8fcccb2f5b6c480d35df590476344201 upstream.

On x86-32 the idt_table with 256 entries needs only 2048 bytes. It is
page-aligned, but the end of the .bss..page_aligned section is not
guaranteed to be page-aligned.

As a result, objects from other .bss sections may end up on the same 4k
page as the idt_table, and will accidentially get mapped read-only during
boot, causing unexpected page-faults when the kernel writes to them.

This could be worked around by making the objects in the page aligned
sections page sized, but that's wrong.

Explicit sections which store only page aligned objects have an implicit
guarantee that the object is alone in the page in which it is placed. That
works for all objects except the last one. That's inconsistent.

Enforcing page sized objects for these sections would wreckage memory
sanitizers, because the object becomes artificially larger than it should
be and out of bound access becomes legit.

Align the end of the .bss..page_aligned and .data..page_aligned section on
page-size so all objects places in these sections are guaranteed to have
their own page.

[ tglx: Amended changelog ]

Signed-off-by: Joerg Roedel <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-07-29 10:18:45 +02:00
..
alpha scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
arc ARC: elf: use right ELF_ARCH 2020-07-16 08:16:46 +02:00
arm ARM: dts: n900: remove mmc1 card detect gpio 2020-07-29 10:18:36 +02:00
arm64 arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP 2020-07-29 10:18:40 +02:00
c6x
csky csky: Fixup abiv2 syscall_trace break a4 & a5 2020-06-17 16:40:21 +02:00
h8300
hexagon hexagon: define ioremap_uc 2020-05-10 10:31:31 +02:00
ia64 scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
m68k scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:37:02 +01:00
mips irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:18:28 +02:00
nds32
nios2
openrisc openrisc: Fix issue with argument clobbering for clone/fork 2020-06-24 17:50:37 +02:00
parisc parisc: Add atomic64_set_release() define to avoid CPU soft lockups 2020-07-29 10:18:45 +02:00
powerpc powerpc/pseries/svm: Fix incorrect check for shared_lppaca_size 2020-07-22 09:33:14 +02:00
riscv RISC-V: Upgrade smp_mb__after_spinlock() to iorw,iorw 2020-07-29 10:18:40 +02:00
s390 s390/maccess: add no DAT mode to kernel_write 2020-07-16 08:16:48 +02:00
sh scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
sparc scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
um um: ensure make ARCH=um mrproper removes arch/$(SUBARCH)/include/generated/ 2020-05-02 08:48:53 +02:00
unicore32
x86 x86, vmlinux.lds: Page-align end of ..page_aligned sections 2020-07-29 10:18:45 +02:00
xtensa xtensa: update *pos in cpuinfo_op.next 2020-07-29 10:18:26 +02:00
.gitignore
Kconfig asm-generic/tlb: add missing CONFIG symbol 2020-02-24 08:37:02 +01:00