mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sysctl remove __user qualifier from stack_erasing_sysctl buffer argument
@ 2025-10-27 11:28 Joel Granados
  0 siblings, 0 replies; only message in thread
From: Joel Granados @ 2025-10-27 11:28 UTC (permalink / raw)
  To: Kees Cook, Gustavo A. R. Silva
  Cc: linux-hardening, linux-kernel, kernel test robot, Joel Granados

The buffer arg in proc handler functions have been void* (no __user
qualifier) since commit 32927393dc1c ("sysctl: pass kernel pointers to
->proc_handler"). The __user qualifier was erroneously brought back in
commit 0df8bdd5e3b3 ("stackleak: move stack_erasing sysctl to
stackleak.c"). This fixes the error by remiving the __user qualifier.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510221719.3ggn070M-lkp@intel.com/
Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
 kernel/kstack_erase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/kstack_erase.c b/kernel/kstack_erase.c
index e49bb88b4f0a32eca192003f1995e2923d6a4afa..d4449884084c7d9e483d6980e4fa1e73f0305e9e 100644
--- a/kernel/kstack_erase.c
+++ b/kernel/kstack_erase.c
@@ -23,7 +23,7 @@ static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass);
 
 #ifdef CONFIG_SYSCTL
 static int stack_erasing_sysctl(const struct ctl_table *table, int write,
-			void __user *buffer, size_t *lenp, loff_t *ppos)
+			void *buffer, size_t *lenp, loff_t *ppos)
 {
 	int ret = 0;
 	int state = !static_branch_unlikely(&stack_erasing_bypass);

---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251027-jag-sysctl-a158661633a2

Best regards,
-- 
Joel Granados <joel.granados@kernel.org>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-27 11:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-27 11:28 [PATCH] sysctl remove __user qualifier from stack_erasing_sysctl buffer argument Joel Granados

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®