[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251217-jag-no-macro-conv-v1-0-6e4252687915@kernel.org>
Date: Wed, 17 Dec 2025 09:04:38 +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 0/7] sysctl: Replace the converter macros with functions
Remove all the macros that were created to get jiffies out of sysctl.c.
In [1] we leaned a bit too hard on macros to generate the converter
functions needed in jiffies.c, pipe.c and sysctl.c. In this series we
replace the macros with regular functions to help in debugging and to
better align with coding-style.rst. This series has been tested with
sysctl self tests (x86_64) and with 0-day.
A note about checkpatch: It really dislikes the use of -ENOSYS and
unused arguments in the no-op versions of the functions. These are all
false positives IMO as -ENOSYS should be returned to the syscall that is
reading or writing the proc file.
Comments are greatly appreciated
Best
[1] https://lore.kernel.org/all/tqz52ig2b5jas3qqt6jqqek7uwyg64ny5qnwy6gclhgjcy4ltb@s7jiay5vyomg/
Signed-off-by: Joel Granados <joel.granados@...nel.org>
---
Joel Granados (7):
sysctl: Return -ENOSYS from proc_douintvec_conv when CONFIG_PROC_SYSCTL=n
sysctl: clarify proc_douintvec_minmax doc
sysctl: Add CONFIG_PROC_SYSCTL guards for converter macros
sysctl: Replace UINT converter macros with functions
sysctl: Add kernel doc to proc_douintvec_conv
sysctl: Replace unidirectional INT converter macros with functions
sysctl: replace SYSCTL_INT_CONV_CUSTOM macro with functions
fs/pipe.c | 22 +++-
include/linux/sysctl.h | 120 +++-------------------
kernel/sysctl.c | 274 +++++++++++++++++++++++++++++++++++++++++++++----
kernel/time/jiffies.c | 134 ++++++++++++++++++++----
4 files changed, 403 insertions(+), 147 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251216-jag-no-macro-conv-3a55e69cccd8
Best regards,
--
Joel Granados <joel.granados@...nel.org>
Powered by blists - more mailing lists