aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
diff options
context:
space:
mode:
authorWill Deacon <[email protected]>2022-09-22 22:57:15 +0100
committerWill Deacon <[email protected]>2022-09-23 13:39:01 +0100
commit13b0566962914e167cb3238fbe29ced618f07a27 (patch)
tree2e257520069fd1e9db0ddfd7f2ed802d6c2c6d62 /drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
parent05d6f6d346fea2fa4580a0c2b6be207456bebb08 (diff)
vmlinux.lds.h: CFI: Reduce alignment of jump-table to function alignment
Due to undocumented, hysterical raisins on x86, the CFI jump-table sections in .text are needlessly aligned to PMD_SIZE in the vmlinux linker script. When compiling a CFI-enabled arm64 kernel with a 64KiB page-size, a PMD maps 512MiB of virtual memory and so the .text section increases to a whopping 940MiB and blows the final Image up to 960MiB. Others report a link failure. Since the CFI jump-table requires only instruction alignment, reduce the alignment directives to function alignment for parity with other parts of the .text section. This reduces the size of the .text section for the aforementioned 64KiB page size arm64 kernel to 19MiB for a much more reasonable total Image size of 39MiB. Cc: Sami Tolvanen <[email protected]> Cc: Mark Rutland <[email protected]> Cc: "Mohan Rao .vanimina" <[email protected]> Cc: Kees Cook <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/all/CAL_GTzigiNOMYkOPX1KDnagPhJtFNqSK=1USNbS0wUL4PW6-Uw@mail.gmail.com/ Fixes: cf68fffb66d6 ("add support for Clang CFI") Reviewed-by: Mark Rutland <[email protected]> Tested-by: Mark Rutland <[email protected]> Reviewed-by: Sami Tolvanen <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/inc/mod_shared.h')
0 files changed, 0 insertions, 0 deletions