[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251217-jag-no-macro-conv-v1-1-6e4252687915@kernel.org>
Date: Wed, 17 Dec 2025 09:04:39 +0100
From: Joel Granados <joel.granados@...nel.org>
To: Kees Cook <kees@...nel.org>, Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Joel Granados <joel.granados@...nel.org>
Subject: [PATCH 1/7] sysctl: Return -ENOSYS from proc_douintvec_conv when
CONFIG_PROC_SYSCTL=n
Ensure an error if prco_douintvec_conv is erroneously called in a system
with CONFIG_PROC_SYSCTL=n
Signed-off-by: Joel Granados <joel.granados@...nel.org>
---
kernel/sysctl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2cd767b9680eb696efeae06f436548777b1b6844..84ca24fb1965e97dc9e6f71f42a6c99c01aca3ee 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1055,6 +1055,14 @@ int proc_douintvec_minmax(const struct ctl_table *table, int dir,
return -ENOSYS;
}
+int proc_douintvec_conv(const struct ctl_table *table, int write, void *buffer,
+ size_t *lenp, loff_t *ppos,
+ int (*conv)(unsigned long *lvalp, unsigned int *valp,
+ int write, const struct ctl_table *table))
+{
+ return -ENOSYS;
+}
+
int proc_dou8vec_minmax(const struct ctl_table *table, int dir,
void *buffer, size_t *lenp, loff_t *ppos)
{
--
2.50.1
Powered by blists - more mailing lists