All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Kees Cook <keescook@chromium.org>,
	Francis Laniel <laniel_francis@privacyrequired.com>,
	Petr Mladek <pmladek@suse.com>,
	linux-kernel@vger.kernel.org, Andy Shevchenko <andy@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	kernel test robot <lkp@intel.com>,
	Nathan Chancellor <natechancellor@gmail.com>
Subject: Re: [PATCH v3 1/3] string: Make stpcpy() possible to use
Date: Wed, 26 Jan 2022 20:07:39 +0200	[thread overview]
Message-ID: <YfGN6xOP4PTL3k3P@smile.fi.intel.com> (raw)
In-Reply-To: <CAKwvOdkBAe4qMdFgDFWNLHMsJrW+PBwa7-hAL5T9fReQqNiF7g@mail.gmail.com>

On Wed, Jan 26, 2022 at 09:49:38AM -0800, Nick Desaulniers wrote:
> On Wed, Jan 26, 2022 at 6:19 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > It is a good rule to avoid submitting code without users.
> > Currently the stpcpy() is unusable due to missed declaration.
> > Any attempts to use it will bring something like:
> >
> >   error: implicit declaration of function ‘stpcpy’ [-Werror=implicit-function-declaration]
> >
> > Move declaration to the header and guard it as other string functions.

...

> Recall the discussion from Kees:
> https://lore.kernel.org/lkml/CAK7LNAQXo5-5W6hvNMEVPBPf3tRWaf-pQdSR-0OHyi4RCGhjsQ@mail.gmail.com/
> and
> https://lore.kernel.org/lkml/202008150921.B70721A359@keescook/

> I'm guessing that the 0day bot report was on the third patch in this
> series, which looks to use stpcpy:
> https://lore.kernel.org/lkml/20220126141917.75399-3-andriy.shevchenko@linux.intel.com/
> 
> for patch 3,

Yes. It was Rasmus' suggestion.

> I'd s/"compress"/de-duplicate/ or s/"compress"/merge/.

I'll fix it locally.

> Kees, I'm curious if we can do something like require the string
> length to be known at compile time otherwise BUILD_BUG_ON?

Perhaps static_assert() is better.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-01-26 18:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 14:19 [PATCH v3 1/3] string: Make stpcpy() possible to use Andy Shevchenko
2022-01-26 14:19 ` [PATCH v3 2/3] vsprintf: Fix potential unaligned access Andy Shevchenko
2022-01-26 14:19 ` [PATCH v3 3/3] vsprintf: Move space out of string literals in fourcc_string() Andy Shevchenko
2022-01-26 21:22   ` Kees Cook
2022-01-27 11:04     ` Sakari Ailus
2022-01-27 14:57     ` Andy Shevchenko
2022-01-26 16:38 ` [PATCH v3 1/3] string: Make stpcpy() possible to use Nathan Chancellor
2022-01-26 18:04   ` Andy Shevchenko
2022-01-26 17:49 ` Nick Desaulniers
2022-01-26 18:07   ` Andy Shevchenko [this message]
2022-01-26 18:12   ` Andy Shevchenko
2022-01-26 21:09     ` Kees Cook

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=YfGN6xOP4PTL3k3P@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=keescook@chromium.org \
    --cc=laniel_francis@privacyrequired.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=lkp@intel.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /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.