[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQkRoPNnCuhgXZUhHSFdFp2Uj7tnbw3k4QwuW+LXZ9e=w@mail.gmail.com>
Date: Sat, 3 May 2025 21:30:21 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mcgrof@...nel.org, x86@...nel.org, hpa@...or.com, petr.pavlu@...e.com,
samitolvanen@...gle.com, da.gomez@...sung.com, nathan@...nel.org,
nicolas@...sle.eu, linux-kernel@...r.kernel.org,
linux-modules@...r.kernel.org, linux-kbuild@...r.kernel.org,
hch@...radead.org, gregkh@...uxfoundation.org, roypat@...zon.co.uk
Subject: Re: [PATCH v3 2/5] module: Add module specific symbol namespace support
On Fri, May 2, 2025 at 11:26 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> Designate the "module:${modname}" symbol namespace to mean: 'only
> export to the named module'.
>
> Notably, explicit imports of anything in the "module:" space is
> forbidden.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> kernel/module/main.c | 33 +++++++++++++++++++++++++++++++--
> scripts/mod/modpost.c | 11 ++++++++++-
> 2 files changed, 41 insertions(+), 3 deletions(-)
>
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -1083,6 +1083,14 @@ static char *get_modinfo(const struct lo
> return get_next_modinfo(info, tag, NULL);
> }
>
> +static bool verify_module_namespace(const char *namespace, const char *modname)
> +{
> + const char *prefix = "module:";
> +
> + return strstarts(namespace, prefix) &&
> + !strsmp(namespace + strlen(prefix), modname);
Apparently, you did not spend time for per-commit compile testing.
I believe it is a typo of "strcmp()".
I got this build error.
../kernel/module/main.c: In function 'verify_module_namespace':
../kernel/module/main.c:1091:17: error: implicit declaration of
function 'strsmp'; did you mean 'strsep'?
[-Wimplicit-function-declaration]
1091 | !strsmp(namespace + strlen(prefix), modname);
| ^~~~~~
| strsep
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists