diff options
author | Joe Lawrence <[email protected]> | 2021-08-22 18:50:36 -0400 |
---|---|---|
committer | Josh Poimboeuf <[email protected]> | 2021-10-05 12:03:20 -0700 |
commit | dc02368164bd0ec603e3f5b3dd8252744a667b8a (patch) | |
tree | 37bdf201a6df6c0818324c3985a587d22eb5b20d /drivers/usb/cdns3/cdns3-imx.c | |
parent | 4d8b35968bbf9e42b6b202eedb510e2c82ad8b38 (diff) |
objtool: Make .altinstructions section entry size consistent
Commit e31694e0a7a7 ("objtool: Don't make .altinstructions writable")
aligned objtool-created and kernel-created .altinstructions section
flags, but there remains a minor discrepency in their use of a section
entry size: objtool sets one while the kernel build does not.
While sh_entsize of sizeof(struct alt_instr) seems intuitive, this small
deviation can cause failures with external tooling (kpatch-build).
Fix this by creating new .altinstructions sections with sh_entsize of 0
and then later updating sec->sh_size as alternatives are added to the
section. An added benefit is avoiding the data descriptor and buffer
created by elf_create_section(), but previously unused by
elf_add_alternative().
Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls")
Signed-off-by: Joe Lawrence <[email protected]>
Reviewed-by: Miroslav Benes <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: Andy Lavr <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: [email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions