mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] binfmt: Remove loader from linux_binprm struct
@ 2025-01-11 19:15 Yonatan Goldschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Yonatan Goldschmidt @ 2025-01-11 19:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kees Cook, Eric W. Biederman, 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.

Signed-off-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
Applies on e0daef7de1acec.

 fs/exec.c               | 2 --
 include/linux/binfmts.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 98cb7ba99..0e642f111 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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))
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index e6c00e860..3513e6fe7 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -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. */
 
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] binfmt: Remove loader from linux_binprm struct
  2025-02-23 22:32 Yonatan Goldschmidt
@ 2025-02-24 19:30 ` Kees Cook
  0 siblings, 0 replies; 3+ messages in thread
From: Kees Cook @ 2025-02-24 19:30 UTC (permalink / raw)
  To: linux-kernel, Yonatan Goldschmidt; +Cc: Kees Cook, Eric W. Biederman

On Mon, 24 Feb 2025 00:32:34 +0200, Yonatan Goldschmidt wrote:
> 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,

-- 
Kees Cook


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] binfmt: Remove loader from linux_binprm struct
@ 2025-02-23 22:32 Yonatan Goldschmidt
  2025-02-24 19:30 ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: Yonatan Goldschmidt @ 2025-02-23 22:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kees Cook, Eric W. Biederman, 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.

Signed-off-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
 fs/exec.c               | 2 --
 include/linux/binfmts.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 506cd411f4ac..f45859ad13ac 100644
--- 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))
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 60d674af3080..1625c8529e70 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -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
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-24 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11 19:15 [PATCH] binfmt: Remove loader from linux_binprm struct Yonatan Goldschmidt
2025-02-23 22:32 Yonatan Goldschmidt
2025-02-24 19:30 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®