Commit fa1bdca
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: Alexander Viro <[email protected]>
Signed-off-by: Nir Lichtman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>1 parent 4188fc3 commit fa1bdca
1 file changed
+1
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1723 | 1723 | | |
1724 | 1724 | | |
1725 | 1725 | | |
1726 | | - | |
1727 | 1726 | | |
1728 | 1727 | | |
1729 | 1728 | | |
1730 | 1729 | | |
1731 | 1730 | | |
1732 | | - | |
1733 | 1731 | | |
1734 | 1732 | | |
1735 | 1733 | | |
| |||
1741 | 1739 | | |
1742 | 1740 | | |
1743 | 1741 | | |
1744 | | - | |
1745 | | - | |
1746 | 1742 | | |
1747 | 1743 | | |
1748 | 1744 | | |
| |||
1760 | 1756 | | |
1761 | 1757 | | |
1762 | 1758 | | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
1773 | | - | |
| 1759 | + | |
1774 | 1760 | | |
1775 | 1761 | | |
1776 | 1762 | | |
| |||
0 commit comments