From: Andy Shevchenko <andy@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Kees Cook <kees@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
llvm@lists.linux.dev, linux-efi@vger.kernel.org
Subject: Re: [PATCH RFC 2/2] wcslen() prototype in string.h
Date: Wed, 26 Mar 2025 10:59:52 +0200 [thread overview]
Message-ID: <Z-PCCCAPS4uvL3jZ@smile.fi.intel.com> (raw)
In-Reply-To: <20250326003303.GA2394@ax162>
On Tue, Mar 25, 2025 at 05:33:03PM -0700, Nathan Chancellor wrote:
> On Tue, Mar 25, 2025 at 02:45:21PM -0700, Nathan Chancellor wrote:
...
> > +#include <linux/nls.h> /* for wchar_t */
>
> Good thing I waited :) This include makes s390 unhappy:
>
> https://lore.kernel.org/202503260611.MDurOUhF-lkp@intel.com/
>
> It is possible that should be fixed by adding -Wno-pointer-sign to
> KBUILD_CFLAGS_DECOMPRESSOR so that arch/s390/boot matches the rest of
> the kernel but...
Ah, yes, you beat me up to commenting on this, the string.h and string.c made
in a way that they may be and are used in early boot code, i.e. it must not be
dirtyfied with the kernel code.
...
> > #include <linux/errno.h>
> > #include <linux/limits.h>
> > #include <linux/linkage.h>
> > +#include <linux/nls.h>
> > #include <linux/stddef.h>
> > #include <linux/string.h>
> > #include <linux/types.h>
>
> I wonder if would be better to do something like the below patch in lieu
> of the EFI change above (since there is no chance for a collision) then
> change both of the includes for wchar_t in this diff to nls_types.h? I
> have no strong opinion but this seems like it would be cleaner for the
> sake of backports while not being a bad solution upstream?
> #define _LINUX_NLS_H
>
> #include <linux/init.h>
As I just replied to your previous mail, consider fixing this list as well
by adding module.h and types.h.
...
Overall, can you browse the Ingo's series [1] for the stuff related to this,
if any?
I would avoid doing double efforts or different approaches if we already have
something ready.
[1]: https://lore.kernel.org/linux-kernel/YjBr10JXLGHfEFfi@gmail.com/
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-03-26 8:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 15:45 [PATCH 0/2] string.c: Add wcslen() Nathan Chancellor
2025-03-25 15:45 ` [PATCH 1/2] lib/string.c: " Nathan Chancellor
2025-03-25 15:45 ` [PATCH RFC 2/2] wcslen() prototype in string.h Nathan Chancellor
2025-03-25 16:17 ` Andy Shevchenko
2025-03-25 16:58 ` Nathan Chancellor
2025-03-25 17:05 ` Andy Shevchenko
2025-03-25 21:45 ` Nathan Chancellor
2025-03-26 0:33 ` Nathan Chancellor
2025-03-26 8:59 ` Andy Shevchenko [this message]
2025-03-26 15:37 ` Nathan Chancellor
2025-03-26 15:43 ` Andy Shevchenko
2025-03-26 8:52 ` Andy Shevchenko
2025-03-25 23:55 ` kernel test robot
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=Z-PCCCAPS4uvL3jZ@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=ardb@kernel.org \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.