Ubuntu-focal-kernel/include
Nathan Chancellor 18205c154f vmlinux.lds.h: Fix placement of '.data..decrypted' section
BugLink: https://bugs.launchpad.net/bugs/2002347

commit 000f8870a47bdc36730357883b6aef42bced91ee upstream.

Commit d4c6399900 ("vmlinux.lds.h: Avoid orphan section with !SMP")
fixed an orphan section warning by adding the '.data..decrypted' section
to the linker script under the PERCPU_DECRYPTED_SECTION define but that
placement introduced a panic with !SMP, as the percpu sections are not
instantiated with that configuration so attempting to access variables
defined with DEFINE_PER_CPU_DECRYPTED() will result in a page fault.

Move the '.data..decrypted' section to the DATA_MAIN define so that the
variables in it are properly instantiated at boot time with
CONFIG_SMP=n.

Cc: stable@vger.kernel.org
Fixes: d4c6399900 ("vmlinux.lds.h: Avoid orphan section with !SMP")
Link: https://lore.kernel.org/cbbd3548-880c-d2ca-1b67-5bb93b291d5f@huawei.com/
Debugged-by: Ard Biesheuvel <ardb@kernel.org>
Reported-by: Zhao Wenhui <zhaowenhui8@huawei.com>
Tested-by: xiafukun <xiafukun@huawei.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221108174934.3384275-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2023-02-01 15:21:00 +01:00
..
acpi ACPI: CPPC: Do not prevent CPPC from working in the future 2022-10-17 15:01:30 +02:00
asm-generic vmlinux.lds.h: Fix placement of '.data..decrypted' section 2023-02-01 15:21:00 +01:00
clocksource
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-08-26 11:10:37 +02:00
drm drm: fix EDID struct for old ARM OABI format 2022-08-26 11:07:34 +02:00
dt-bindings
keys
kvm
linux efi: random: reduce seed size to 32 bytes 2023-01-06 08:44:44 -08:00
math-emu
media media: v4l2: Fix v4l2_i2c_subdev_set_name function documentation 2023-01-06 08:44:39 -08:00
misc
net tcp/udp: Make early_demux back namespacified. 2023-01-06 08:44:44 -08:00
pcmcia
ras
rdma
scsi scsi: stex: Properly zero out the passthrough command structure 2022-10-17 15:00:05 +02:00
soc
sound ALSA: core: Add async signal helpers 2022-10-17 15:02:02 +02:00
target
trace spmi: trace: fix stack-out-of-bound access in SPMI tracing functions 2022-10-17 15:01:24 +02:00
uapi capabilities: fix undefined behavior in bit shift for CAP_TO_MASK 2023-02-01 15:20:56 +01:00
vdso
video video: of_display_timing.h: include errno.h 2022-09-16 10:58:57 +02:00
xen