Skip to contentSkip to conversation

binfmt: Remove loader from linux_binprm struct

PATCH Applied Yonatan Goldschmidt 2 participants 2 messages Feb 23, 2025 – Feb 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binfmt: Remove loader from linux_binprm struct

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.

---
 fs/exec.c               | 2 --
 include/linux/binfmts.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
fs/exec.c +0 -2
index 506cd411f4ac..f45859ad13ac 100644
@@ -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))
include/linux/binfmts.h +1 -1
index 60d674af3080..1625c8529e70 100644
@@ -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. */
 

base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6

Signature · 1 line
2.39.5 (Apple Git-154)
maintainer Applied
#1 lore raw
Quoted 5 lines · Yonatan Goldschmidt

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.

Applied to for-next/topic/execve/core, thanks!

[1/1] binfmt: Remove loader from linux_binprm struct

      https://git.kernel.org/kees/c/cc9554e662a3

Take care,

Signature · 1 line
Kees Cook