android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Kurtz a72ac679ca earlycon: Use a pointer table to fix __earlycon_table stride
commit dd709e72cb934eefd44de8d9969097173fbf45dc upstream.

Commit 99492c39f3 ("earlycon: Fix __earlycon_table stride") tried to fix
__earlycon_table stride by forcing the earlycon_id struct alignment to 32
and asking the linker to 32-byte align the __earlycon_table symbol.  This
fix was based on commit 07fca0e57f ("tracing: Properly align linker
defined symbols") which tried a similar fix for the tracing subsystem.

However, this fix doesn't quite work because there is no guarantee that
gcc will place structures packed into an array format.  In fact, gcc 4.9
chooses to 64-byte align these structs by inserting additional padding
between the entries because it has no clue that they are supposed to be in
an array.  If we are unlucky, the linker will assign symbol
"__earlycon_table" to a 32-byte aligned address which does not correspond
to the 64-byte aligned contents of section "__earlycon_table".

To address this same problem, the fix to the tracing system was
subsequently re-implemented using a more robust table of pointers approach
by commits:
 3d56e331b6 ("tracing: Replace syscall_meta_data struct array with pointer array")
 6549864629 ("tracepoints: Fix section alignment using pointer array")
 e4a9ea5ee7 ("tracing: Replace trace_event struct array with pointer array")

Let's use this same "array of pointers to structs" approach for
EARLYCON_TABLE.

Fixes: 99492c39f3 ("earlycon: Fix __earlycon_table stride")
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Suggested-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-01 15:13:09 -07:00
..
acpi ACPICA: OSL: Add support to exclude stdarg.h 2018-04-13 19:48:28 +02:00
asm-generic earlycon: Use a pointer table to fix __earlycon_table stride 2018-05-01 15:13:09 -07:00
clocksource
crypto crypto: hash - prevent using keyed hashes without setting key 2018-02-25 11:05:44 +01:00
drm drm: Allow determining if current task is output poll worker 2018-03-18 11:18:48 +01:00
dt-bindings dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4 2018-04-24 09:34:14 +02:00
keys
kvm arm/arm64: KVM: Turn kvm_psci_version into a static inline 2018-04-20 08:21:05 +02:00
linux earlycon: Use a pointer table to fix __earlycon_table stride 2018-05-01 15:13:09 -07:00
math-emu
media Linux 4.8 2016-10-05 16:43:53 -03:00
memory
misc
net llc: delete timers synchronously in llc_sk_free() 2018-04-29 11:32:00 +02:00
pcmcia
ras
rdma RDMA/ucma: Introduce safer rdma_addr_size() variants 2018-04-08 12:12:49 +02:00
rxrpc
scsi scsi: sg: disable SET_FORCE_LOW_DMA 2018-01-23 19:57:04 +01:00
soc fsl/qe: add bit description for SYNL register for GUMR 2018-04-13 19:48:01 +02:00
sound ALSA: control: Hardening for potential Spectre v1 2018-05-01 15:13:06 -07:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:38:54 +01:00
trace clk: fix a panic error caused by accessing NULL pointer 2018-02-25 11:05:48 +01:00
uapi KVM: s390: wire up bpb feature 2018-04-29 11:31:58 +02:00
video fbdev changes for 4.9 2016-10-12 11:01:37 -07:00
xen swiotlb-xen: implement xen_swiotlb_dma_mmap callback 2017-10-05 09:44:05 +02:00
Kbuild