lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 2 Feb 2022 18:16:28 +0200 From: Andy Shevchenko <andriy.shevchenko@...el.com> To: Guenter Roeck <linux@...ck-us.net> Cc: Kees Cook <keescook@...omium.org>, Geert Uytterhoeven <geert@...ux-m68k.org>, Peter Rosin <peda@...ntia.se>, Andy Shevchenko <andy@...nel.org>, Matteo Croce <mcroce@...rosoft.com>, Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev, linux-hardening@...r.kernel.org Subject: Re: [PATCH] lib/test_string.c: Add test for strlen() On Wed, Feb 02, 2022 at 08:01:49AM -0800, Guenter Roeck wrote: > On Sun, Jan 30, 2022 at 10:36:53AM -0800, Kees Cook wrote: ... > > +static const int strlen_ce = strlen("tada, a constant expression"); > > This results in: > > lib/test_string.c:188:30: error: initializer element is not constant > 188 | static const int strlen_ce = strlen("tada, a constant expression"); > > for several of my tests. I don't think you can mandate that a compiler > implements this. With -O2 probably one can, otherwise I agree. -- With Best Regards, Andy Shevchenko
Powered by blists - more mailing lists