Skip to contentSkip to conversation

binfmt: Remove loader from linux_binprm struct

PATCH New Yonatan Goldschmidt 1 participant 1 message Jan 11, 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.

---
Applies on e0daef7de1acec.

 fs/exec.c               | 2 --
 include/linux/binfmts.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
fs/exec.c +0 -2
index 98cb7ba99..0e642f111 100644
@@ -763,8 +763,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 e6c00e860..3513e6fe7 100644
@@ -57,7 +57,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. */
 
Signature · 1 line
2.39.5 (Apple Git-154)