diff options
| author | Dave Martin <[email protected]> | 2025-07-01 13:56:16 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2025-07-15 05:27:49 +0000 |
| commit | a55128d392e86507a0e6672ebcdf20d1dd77744b (patch) | |
| tree | 0c536975c4604e080393757fdc4cabdf4a8bef6e /lib/crypto/mpi/mpi-sub-ui.c | |
| parent | xtensa: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names (diff) | |
| download | kernel-a55128d392e86507a0e6672ebcdf20d1dd77744b.tar.gz kernel-a55128d392e86507a0e6672ebcdf20d1dd77744b.zip | |
binfmt_elf: Warn on missing or suspicious regset note names
Now that all regset definitions declare an explicit note name, warn if
the note name is missing when generating a core dump. Simplify the
fallback to always guess "LINUX", which is appropriate for all
Linux-specific notes (i.e., all newly added notes, for a long time
now). The one standard exception (PR_FPREG) will no longer have an
"unexpected" note name overridden, but a warning will still be emitted.
Also warn if the specified note name doesn't match the legacy
pattern -- but don't bother to override the name in this case. This
warning can be removed in future if new note types emerge that require
a specific note name that is not "LINUX".
No functional change, beyond the extra noise in dmesg and not
overriding an unexpected note name for PR_FPREG any more.
Now that all upstream arches are ported to use USER_REGSET_NOTE_TYPE(),
new regsets created by copy-pasting existing code should end up correct
by construction.
Signed-off-by: Dave Martin <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Akihiko Odaki <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions
