]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
binfmt: Remove loader from linux_binprm struct
authorYonatan Goldschmidt <yon.goldschmidt@gmail.com>
Sun, 23 Feb 2025 22:32:34 +0000 (00:32 +0200)
committerKees Cook <kees@kernel.org>
Mon, 24 Feb 2025 19:30:16 +0000 (11:30 -0800)
Commit 987f20a9dcce ("a.out: Remove the a.out implementation") removed
the last in-tree user of the loader field, and as far as I can tell, it
was the only one historically.

Signed-off-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Link: https://lore.kernel.org/r/20250223223234.13764-1-yon.goldschmidt@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
fs/exec.c
include/linux/binfmts.h

index 506cd411f4ac2ecd8a4ba5711fb5952d44182064..f45859ad13acaac9dd926254c0a57f6614e5ec8d 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -755,8 +755,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
        mm->arg_start = bprm->p;
 #endif
 
-       if (bprm->loader)
-               bprm->loader -= stack_shift;
        bprm->exec -= stack_shift;
 
        if (mmap_write_lock_killable(mm))
index 60d674af3080a2ad7ba1605ea0d90daf4d1d47fb..1625c8529e70018ba08464c43bc2bc2a1f498d8d 100644 (file)
@@ -64,7 +64,7 @@ struct linux_binprm {
        const char *fdpath;     /* generated filename for execveat */
        unsigned interp_flags;
        int execfd;             /* File descriptor of the executable */
-       unsigned long loader, exec;
+       unsigned long exec;
 
        struct rlimit rlim_stack; /* Saved RLIMIT_STACK used during exec. */