From: sashiko-bot@kernel.org
To: "Mauricio Faria de Oliveira" <mfo@igalia.com>
Cc: "Alexander Gordeev" <agordeev@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
linux-s390@vger.kernel.org, bpf@vger.kernel.org,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
mptcp@lists.linux.dev
Subject: Re: [PATCH RFC v2 07/13] sysctl, net: update register_net_sysctl{_sz}() callers with template arguments
Date: Wed, 19 Aug 2026 02:48:03 +0000 [thread overview]
Message-ID: <20260819024803.6ECC11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818-sysctl-module-aliases-v2-7-d5a69dae5798@igalia.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Syntax error and implicit function declaration when CONFIG_SYSCTL is disabled due to macro collision.
- [Low] The `__UNIQUE_ID` macro is used without arguments in `__MODULE_SYSCTL_TABLE_NAME`, preventing it from generating a unique identifier.
--
--- Patch [7]: [PATCH RFC v2 07/13] sysctl, net: update register_net_sysctl{_sz}() callers with template arguments ---
commit 35e3405d9382d3cfe84c302ce928023b61da151b
Author: Mauricio Faria de Oliveira <mfo@igalia.com>
sysctl, net: update register_net_sysctl{_sz}() callers with template arguments
Update most callers with dynamic table/path to use template arguments.
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index 1349c0eedb642..bdd67dd879d24 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -12,6 +12,7 @@
> */
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +#define SYSCTL_MODULE_ALIASES_UNIQUE_ID
[Severity: Low]
When SYSCTL_MODULE_ALIASES_UNIQUE_ID is defined here, the macro
__MODULE_SYSCTL_TABLE_NAME(table) in include/linux/sysctl.h expands to
__mod_device_table(sysctl, __UNIQUE_ID).
Since __UNIQUE_ID is a function-like macro requiring a prefix argument, does
omitting the parentheses prevent it from being expanded by the preprocessor?
Could this create identical literal symbol names for all instances in a module
and defeat the uniqueness mechanism?
>
> #include <linux/slab.h>
> #include <linux/types.h>
[ ... ]
> @@ -3910,11 +3911,15 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
> BUG();
> }
>
> - snprintf(neigh_path, sizeof(neigh_path), "net/%s/neigh/%s",
> - p_name, dev_name_source);
> +#define path_template "net/%s/neigh/%s"
> + snprintf(neigh_path, sizeof(neigh_path), path_template,
> + p_name, dev_name_source);
> t->sysctl_header = register_net_sysctl_sz(neigh_parms_net(p),
> neigh_path, t->neigh_vars,
> - neigh_vars_size);
> + neigh_vars_size,
> + neigh_sysctl_template.neigh_vars,
> + path_template);
[Severity: Low]
Does this call to register_net_sysctl_sz() cause a build failure when
CONFIG_SYSCTL is disabled?
It looks like register_net_sysctl_sz is globally defined as a macro, which
unconditionally expands over the static inline fallback definition in
include/net/net_namespace.h, producing invalid C syntax. Additionally, would
this macro expand to __register_net_sysctl_sz(), which lacks a stub in the
!CONFIG_SYSCTL path, causing implicit function declaration errors?
> +#undef path_template
> if (!t->sysctl_header)
> goto free;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818-sysctl-module-aliases-v2-0-d5a69dae5798@igalia.com?part=7
next prev parent reply other threads:[~2026-08-19 2:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 2:27 [PATCH RFC v2 00/13] sysctl: add module aliases Mauricio Faria de Oliveira
2026-08-19 2:28 ` [PATCH RFC v2 01/13] keys, pidns, fs/verity, riscv/vector: reorder '#include <linux/sysctl.h>' Mauricio Faria de Oliveira
2026-08-19 2:33 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 02/13] proc: add config option SYSCTL_MODULE_ALIASES Mauricio Faria de Oliveira
2026-08-19 2:37 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 03/13] sysctl, mod_devicetable: add macro MODULE_SYSCTL_TABLE Mauricio Faria de Oliveira
2026-08-19 2:40 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 04/13] sysctl: add register_sysctl() wrapper for MODULE_SYSCTL_TABLE Mauricio Faria de Oliveira
2026-08-19 2:44 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 05/13] sysctl, parport: update register_sysctl() callers with template arguments Mauricio Faria de Oliveira
2026-08-19 2:44 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 06/13] sysctl, net: add register_net_sysctl{_sz}() wrappers for MODULE_SYSCTL_TABLE Mauricio Faria de Oliveira
2026-08-19 2:40 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 07/13] sysctl, net: update register_net_sysctl{_sz}() callers with template arguments Mauricio Faria de Oliveira
2026-08-19 2:48 ` sashiko-bot [this message]
2026-08-19 2:28 ` [PATCH RFC v2 08/13] sysctl, net: update register_net_sysctl_sz(ARRAY_SIZE(table_tmpl)) " Mauricio Faria de Oliveira
2026-08-19 2:36 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 09/13] sysctl, ipv6: update register_net_sysctl{_sz}() callers " Mauricio Faria de Oliveira
2026-08-19 2:36 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 10/13] sysctl, net: update register_net_sysctl_sz() edge case Mauricio Faria de Oliveira
2026-08-19 2:39 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 11/13] sysctl: unrandomize struct ctl_table.procname Mauricio Faria de Oliveira
2026-08-19 2:38 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 12/13] modpost: move addend_*_rel() calls into addend_rel() Mauricio Faria de Oliveira
2026-08-19 2:39 ` sashiko-bot
2026-08-19 2:28 ` [PATCH RFC v2 13/13] modpost: handle MODULE_SYSCTL_TABLE symbols Mauricio Faria de Oliveira
2026-08-19 2:48 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260819024803.6ECC11F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=mfo@igalia.com \
--cc=mptcp@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox