* [PATCH v1 1/1] string: Export strnchrnul()
@ 2026-11-10 16:41 Andy Shevchenko
2026-11-10 16:49 ` Andy Shevchenko
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-11-10 16:41 UTC (permalink / raw)
To: linux-hardening, linux-kernel
Cc: Kees Cook, Andy Shevchenko, Andrew Morton, Yury Norov,
Ilpo Järvinen, jorge.lopez2, hansg, Muhammad Bilal,
platform-driver-x86, Andy Shevchenko, Armin Wolf
Export strnchrnul() for users that may be compiled as modules.
Reported-by: Armin Wolf <W_Armin@gmx.de>
Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Assumed to go via PDx86 where the first (wow!) module user wants to use it.
lib/string.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/string.c b/lib/string.c
index a3778d5aab4a..cc8982a93afc 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
s++;
return (char *)s;
}
+EXPORT_SYMBOL(strnchrnul);
#ifndef __HAVE_ARCH_STRRCHR
/**
--
2.50.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 16:41 [PATCH v1 1/1] string: Export strnchrnul() Andy Shevchenko
@ 2026-11-10 16:49 ` Andy Shevchenko
2026-11-10 16:55 ` Armin Wolf
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-11-10 16:49 UTC (permalink / raw)
To: linux-hardening, linux-kernel
Cc: Kees Cook, Andy Shevchenko, Andrew Morton, Yury Norov,
Ilpo Järvinen, jorge.lopez2, hansg, Muhammad Bilal,
platform-driver-x86, Armin Wolf
On Tue, Nov 10, 2026 at 05:41:50PM +0100, Andy Shevchenko wrote:
> Export strnchrnul() for users that may be compiled as modules.
>
> Reported-by: Armin Wolf <W_Armin@gmx.de>
> Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> Assumed to go via PDx86 where the first (wow!) module user wants to use it.
Actually with the given Fixes tag it may go usual way to next -rcX.
So, whatever appropriate the respective maintainers think...
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 16:41 [PATCH v1 1/1] string: Export strnchrnul() Andy Shevchenko
2026-11-10 16:49 ` Andy Shevchenko
@ 2026-11-10 16:55 ` Armin Wolf
2026-11-10 18:01 ` Yury Norov
2026-11-10 18:29 ` Ilpo Järvinen
3 siblings, 0 replies; 8+ messages in thread
From: Armin Wolf @ 2026-11-10 16:55 UTC (permalink / raw)
To: Andy Shevchenko, linux-hardening, linux-kernel
Cc: Kees Cook, Andy Shevchenko, Andrew Morton, Yury Norov,
Ilpo Järvinen, jorge.lopez2, hansg, Muhammad Bilal,
platform-driver-x86
Am 10.11.26 um 17:41 schrieb Andy Shevchenko:
> Export strnchrnul() for users that may be compiled as modules.
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> Reported-by: Armin Wolf <W_Armin@gmx.de>
> Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> Assumed to go via PDx86 where the first (wow!) module user wants to use it.
>
> lib/string.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/string.c b/lib/string.c
> index a3778d5aab4a..cc8982a93afc 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
> s++;
> return (char *)s;
> }
> +EXPORT_SYMBOL(strnchrnul);
>
> #ifndef __HAVE_ARCH_STRRCHR
> /**
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 16:41 [PATCH v1 1/1] string: Export strnchrnul() Andy Shevchenko
2026-11-10 16:49 ` Andy Shevchenko
2026-11-10 16:55 ` Armin Wolf
@ 2026-11-10 18:01 ` Yury Norov
2026-11-10 18:39 ` Ilpo Järvinen
2026-11-10 18:29 ` Ilpo Järvinen
3 siblings, 1 reply; 8+ messages in thread
From: Yury Norov @ 2026-11-10 18:01 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-hardening, linux-kernel, Kees Cook, Andy Shevchenko,
Andrew Morton, Yury Norov, Ilpo Järvinen, jorge.lopez2,
hansg, Muhammad Bilal, platform-driver-x86, Armin Wolf
On Tue, Nov 10, 2026 at 05:41:50PM +0100, Andy Shevchenko wrote:
> Export strnchrnul() for users that may be compiled as modules.
>
> Reported-by: Armin Wolf <W_Armin@gmx.de>
> Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
Not sure that exporting a symbol is actually a fix. It rather looks
like a normal development. Also, I'd like to have this patch attached
to the PDx86 or whatever series that uses it.
Their implementation may change, so this would become the exported
symbols space bloat.
Thanks,
Yury
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> Assumed to go via PDx86 where the first (wow!) module user wants to use it.
>
> lib/string.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/string.c b/lib/string.c
> index a3778d5aab4a..cc8982a93afc 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
> s++;
> return (char *)s;
> }
> +EXPORT_SYMBOL(strnchrnul);
>
> #ifndef __HAVE_ARCH_STRRCHR
> /**
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 16:41 [PATCH v1 1/1] string: Export strnchrnul() Andy Shevchenko
` (2 preceding siblings ...)
2026-11-10 18:01 ` Yury Norov
@ 2026-11-10 18:29 ` Ilpo Järvinen
2026-11-10 19:34 ` Andy Shevchenko
3 siblings, 1 reply; 8+ messages in thread
From: Ilpo Järvinen @ 2026-11-10 18:29 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-hardening, LKML, Kees Cook, Andy Shevchenko, Andrew Morton,
Yury Norov, jorge.lopez2, Hans de Goede, Muhammad Bilal,
platform-driver-x86, Armin Wolf
On Tue, 10 Nov 2026, Andy Shevchenko wrote:
> Export strnchrnul() for users that may be compiled as modules.
>
> Reported-by: Armin Wolf <W_Armin@gmx.de>
> Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> Assumed to go via PDx86 where the first (wow!) module user wants to use it.
Thanks guys,
I'm so surprised by this, sashiko did warn about this so I even checked
myself and saw an export after the closing brace so thought sashiko was
just wrong... Maybe I was looking that the strrchr's export, can't think
of anything else to explain it.
> lib/string.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/string.c b/lib/string.c
> index a3778d5aab4a..cc8982a93afc 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
> s++;
> return (char *)s;
> }
> +EXPORT_SYMBOL(strnchrnul);
>
> #ifndef __HAVE_ARCH_STRRCHR
> /**
>
--
i.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 18:01 ` Yury Norov
@ 2026-11-10 18:39 ` Ilpo Järvinen
2026-11-10 18:42 ` Yury Norov
0 siblings, 1 reply; 8+ messages in thread
From: Ilpo Järvinen @ 2026-11-10 18:39 UTC (permalink / raw)
To: Yury Norov
Cc: Andy Shevchenko, linux-hardening, LKML, Kees Cook,
Andy Shevchenko, Andrew Morton, Yury Norov, jorge.lopez2,
Hans de Goede, Muhammad Bilal, platform-driver-x86, Armin Wolf
On Tue, 10 Nov 2026, Yury Norov wrote:
> On Tue, Nov 10, 2026 at 05:41:50PM +0100, Andy Shevchenko wrote:
> > Export strnchrnul() for users that may be compiled as modules.
> >
> > Reported-by: Armin Wolf <W_Armin@gmx.de>
> > Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> > Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
>
> Not sure that exporting a symbol is actually a fix. It rather looks
> like a normal development. Also, I'd like to have this patch attached
> to the PDx86 or whatever series that uses it.
I did put it now before the change that broke because of the missing
export.
I dropped Closes and Fixes tags as the issue should be non-problem after
the history rewrite.
--
i.
> Their implementation may change, so this would become the exported
> symbols space bloat.
>
> Thanks,
> Yury
>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >
> > Assumed to go via PDx86 where the first (wow!) module user wants to use it.
> >
> > lib/string.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/string.c b/lib/string.c
> > index a3778d5aab4a..cc8982a93afc 100644
> > --- a/lib/string.c
> > +++ b/lib/string.c
> > @@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
> > s++;
> > return (char *)s;
> > }
> > +EXPORT_SYMBOL(strnchrnul);
> >
> > #ifndef __HAVE_ARCH_STRRCHR
> > /**
> > --
> > 2.50.1
> >
>
--
i.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 18:39 ` Ilpo Järvinen
@ 2026-11-10 18:42 ` Yury Norov
0 siblings, 0 replies; 8+ messages in thread
From: Yury Norov @ 2026-11-10 18:42 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Yury Norov, Andy Shevchenko, linux-hardening, LKML, Kees Cook,
Andy Shevchenko, Andrew Morton, jorge.lopez2, Hans de Goede,
Muhammad Bilal, platform-driver-x86, Armin Wolf
On Tue, Nov 10, 2026 at 1:39 PM Ilpo Järvinen
<ilpo.jarvinen@linux.intel.com> wrote:
>
> On Tue, 10 Nov 2026, Yury Norov wrote:
>
> > On Tue, Nov 10, 2026 at 05:41:50PM +0100, Andy Shevchenko wrote:
> > > Export strnchrnul() for users that may be compiled as modules.
> > >
> > > Reported-by: Armin Wolf <W_Armin@gmx.de>
> > > Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> > > Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> >
> > Not sure that exporting a symbol is actually a fix. It rather looks
> > like a normal development. Also, I'd like to have this patch attached
> > to the PDx86 or whatever series that uses it.
>
> I did put it now before the change that broke because of the missing
> export.
>
> I dropped Closes and Fixes tags as the issue should be non-problem after
> the history rewrite.
OK, then
Reviewed-by: Yury Norov <ynorov@nvidia.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/1] string: Export strnchrnul()
2026-11-10 18:29 ` Ilpo Järvinen
@ 2026-11-10 19:34 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-11-10 19:34 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: linux-hardening, LKML, Kees Cook, Andy Shevchenko, Andrew Morton,
Yury Norov, jorge.lopez2, Hans de Goede, Muhammad Bilal,
platform-driver-x86, Armin Wolf
On Tue, Nov 10, 2026 at 08:29:58PM +0200, Ilpo Järvinen wrote:
> On Tue, 10 Nov 2026, Andy Shevchenko wrote:
>
> > Export strnchrnul() for users that may be compiled as modules.
> >
> > Reported-by: Armin Wolf <W_Armin@gmx.de>
> > Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@gmx.de
> > Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >
> > Assumed to go via PDx86 where the first (wow!) module user wants to use it.
>
> Thanks guys,
>
> I'm so surprised by this, sashiko did warn about this so I even checked
> myself and saw an export after the closing brace so thought sashiko was
> just wrong... Maybe I was looking that the strrchr's export, can't think
> of anything else to explain it.
The strchrnul is exported, I believe you missed 'n' which may explain the
course of what happened. Compare:
EXPORT_SYMBOL(strchrnul);
EXPORT_SYMBOL(strnchrnul);
If you don't stare on this, you won't notice the difference at a glance.
(I caught myself on the same, but it was after this report, so I spend
a few more seconds to get it.)
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-11-10 19:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 16:41 [PATCH v1 1/1] string: Export strnchrnul() Andy Shevchenko
2026-11-10 16:49 ` Andy Shevchenko
2026-11-10 16:55 ` Armin Wolf
2026-11-10 18:01 ` Yury Norov
2026-11-10 18:39 ` Ilpo Järvinen
2026-11-10 18:42 ` Yury Norov
2026-11-10 18:29 ` Ilpo Järvinen
2026-11-10 19:34 ` Andy Shevchenko
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®