From: Kees Cook <keescook@chromium.org>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Peter Rosin <peda@axentia.se>, Andy Shevchenko <andy@kernel.org>,
Matteo Croce <mcroce@microsoft.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] lib/test_string.c: Add test for strlen()
Date: Sun, 30 Jan 2022 12:35:13 -0800 [thread overview]
Message-ID: <202201301234.D62394C08@keescook> (raw)
In-Reply-To: <202201310303.HQlCsvvd-lkp@intel.com>
On Mon, Jan 31, 2022 at 04:13:30AM +0800, kernel test robot wrote:
> Hi Kees,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on linux/master]
> [also build test ERROR on linus/master kees/for-next/pstore v5.17-rc2 next-20220128]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Kees-Cook/lib-test_string-c-Add-test-for-strlen/20220131-023726
> base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220131/202201310303.HQlCsvvd-lkp@intel.com/config)
> compiler: sh4-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/0day-ci/linux/commit/d22fe883339c5141953dbca980b51466ac3e2329
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Kees-Cook/lib-test_string-c-Add-test-for-strlen/20220131-023726
> git checkout d22fe883339c5141953dbca980b51466ac3e2329
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash M=lib/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> lib/test_string.c:188:30: error: initializer element is not constant
> 188 | static const int strlen_ce = strlen("tada, a constant expression");
> | ^~~~~~
Thanks; this is expected -- the strlen() in -next is currently broken
(and will be fixed in the next -next).
-Kees
>
>
> vim +188 lib/test_string.c
>
> 181
> 182 /*
> 183 * Unlike many other string functions, strlen() can be used in
> 184 * static initializers when string lengths are known at compile
> 185 * time. (i.e. Under these conditions, strlen() is a constant
> 186 * expression.) Make sure it can be used this way.
> 187 */
> > 188 static const int strlen_ce = strlen("tada, a constant expression");
> 189
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
--
Kees Cook
next prev parent reply other threads:[~2022-01-30 20:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-30 18:36 [PATCH] lib/test_string.c: Add test for strlen() Kees Cook
2022-01-30 18:56 ` Andy Shevchenko
2022-01-30 20:34 ` Kees Cook
2022-01-30 20:13 ` kernel test robot
2022-01-30 20:35 ` Kees Cook [this message]
2022-02-02 16:01 ` Guenter Roeck
2022-02-02 16:16 ` Andy Shevchenko
2022-02-02 20:52 ` Kees Cook
2022-02-02 23:12 ` Guenter Roeck
2022-02-03 8:04 ` Geert Uytterhoeven
2022-02-03 16:41 ` Kees Cook
2022-02-03 17:15 ` Kees Cook
2022-02-03 18:09 ` Geert Uytterhoeven
2022-02-03 19:50 ` Nick Desaulniers
2022-02-03 20:25 ` Kees Cook
2022-02-03 20:45 ` 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=202201301234.D62394C08@keescook \
--to=keescook@chromium.org \
--cc=andy@kernel.org \
--cc=geert@linux-m68k.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=mcroce@microsoft.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peda@axentia.se \
/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