Skip to content
Commit fa1bdca9 authored by Nir Lichtman's avatar Nir Lichtman Committed by Kees Cook
Browse files

exec: remove legacy custom binfmt modules autoloading



Problem: The search binary handler logic contains legacy code
to handle automatically loading kernel modules of unsupported
binary formats.
This logic is a leftover from a.out-to-ELF transition.
After removal of a.out support, this code has no use anymore.

Solution: Clean up this code from the search binary handler,
also remove the line initialising retval to -ENOENT and instead
just return -ENOEXEC if the flow has reached the end of the func.

Note: Anyone who might find future uses for this legacy code
would be better off using binfmt_misc to trigger whatever
module loading they might need - would be more flexible that way.

Suggested-by: default avatarAlexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarNir Lichtman <nir@lichtman.org>
Link: https://lore.kernel.org/r/20241116231323.GA225987@lichtman.org


Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent 4188fc31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment