Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-10-11 Thread Kees Cook
On Wed, Oct 10, 2018 at 7:48 PM, Masahiro Yamada wrote: > On Wed, Oct 10, 2018 at 11:51 PM Kees Cook wrote: >> >> On Wed, Oct 10, 2018 at 12:03 AM, Miguel Ojeda >> wrote: >> > On Wed, Oct 10, 2018 at 8:12 AM Joel Stanley wrote: >> >> >> >> On Thu, 27 Sep 2018 at 05:07, Kees Cook wrote: >> >> >

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-10-10 Thread Masahiro Yamada
On Wed, Oct 10, 2018 at 11:51 PM Kees Cook wrote: > > On Wed, Oct 10, 2018 at 12:03 AM, Miguel Ojeda > wrote: > > On Wed, Oct 10, 2018 at 8:12 AM Joel Stanley wrote: > >> > >> On Thu, 27 Sep 2018 at 05:07, Kees Cook wrote: > >> > > >> > Yeah, that's what I'd linked to in the patchwork URL. Andr

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-10-10 Thread Kees Cook
On Wed, Oct 10, 2018 at 12:03 AM, Miguel Ojeda wrote: > On Wed, Oct 10, 2018 at 8:12 AM Joel Stanley wrote: >> >> On Thu, 27 Sep 2018 at 05:07, Kees Cook wrote: >> > >> > Yeah, that's what I'd linked to in the patchwork URL. Andrew, can you take >> > this? >> >> clang built -next is blowing up

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-10-10 Thread Miguel Ojeda
On Wed, Oct 10, 2018 at 8:12 AM Joel Stanley wrote: > > On Thu, 27 Sep 2018 at 05:07, Kees Cook wrote: > > > > Yeah, that's what I'd linked to in the patchwork URL. Andrew, can you take > > this? > > clang built -next is blowing up now that Kees' -Wvla patch has been > included. This patch fixes

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-10-09 Thread Joel Stanley
On Thu, 27 Sep 2018 at 05:07, Kees Cook wrote: > > On Wed, Sep 26, 2018 at 12:29 PM, Nick Desaulniers > wrote: > > On Wed, Sep 26, 2018 at 12:03 PM Greg KH wrote: > >> > >> On Wed, Sep 26, 2018 at 11:45:19AM -0700, Kees Cook wrote: > >> > On Wed, Sep 26, 2018 at 11:42 AM, Greg KH > >> > wrote:

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Kees Cook
On Wed, Sep 26, 2018 at 12:29 PM, Nick Desaulniers wrote: > On Wed, Sep 26, 2018 at 12:03 PM Greg KH wrote: >> >> On Wed, Sep 26, 2018 at 11:45:19AM -0700, Kees Cook wrote: >> > On Wed, Sep 26, 2018 at 11:42 AM, Greg KH >> > wrote: >> > > I'm not digging up a compiler.h patch from a web site an

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Nick Desaulniers
On Wed, Sep 26, 2018 at 12:03 PM Greg KH wrote: > > On Wed, Sep 26, 2018 at 11:45:19AM -0700, Kees Cook wrote: > > On Wed, Sep 26, 2018 at 11:42 AM, Greg KH > > wrote: > > > I'm not digging up a compiler.h patch from a web site and adding it to > > > the tree this late in the release cycle. Esp

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Greg KH
On Wed, Sep 26, 2018 at 11:45:19AM -0700, Kees Cook wrote: > On Wed, Sep 26, 2018 at 11:42 AM, Greg KH wrote: > > I'm not digging up a compiler.h patch from a web site and adding it to > > the tree this late in the release cycle. Especially given that it > > hasn't had any testing anywhere... >

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Kees Cook
On Wed, Sep 26, 2018 at 11:42 AM, Greg KH wrote: > I'm not digging up a compiler.h patch from a web site and adding it to > the tree this late in the release cycle. Especially given that it > hasn't had any testing anywhere... Good point about it not living in -next. Who should be carrying thes

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Greg KH
On Wed, Sep 26, 2018 at 11:26:46AM -0700, Kees Cook wrote: > On Wed, Sep 26, 2018 at 11:03 AM, Nick Desaulniers > wrote: > > On Wed, Sep 26, 2018 at 11:00 AM Matthias Kaehlcke > > wrote: > >> > >> On Fri, Aug 31, 2018 at 09:46:02AM -0700, Nick Desaulniers wrote: > >> > On Tue, Aug 28, 2018 at 4:

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Kees Cook
On Wed, Sep 26, 2018 at 11:03 AM, Nick Desaulniers wrote: > On Wed, Sep 26, 2018 at 11:00 AM Matthias Kaehlcke wrote: >> >> On Fri, Aug 31, 2018 at 09:46:02AM -0700, Nick Desaulniers wrote: >> > On Tue, Aug 28, 2018 at 4:00 PM Nick Desaulniers >> > wrote: >> > > >> > > On Mon, Aug 27, 2018 at 1:

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Nick Desaulniers
On Wed, Sep 26, 2018 at 11:00 AM Matthias Kaehlcke wrote: > > On Fri, Aug 31, 2018 at 09:46:02AM -0700, Nick Desaulniers wrote: > > On Tue, Aug 28, 2018 at 4:00 PM Nick Desaulniers > > wrote: > > > > > > On Mon, Aug 27, 2018 at 1:42 PM Daniel Santos > > > wrote: > > > > > > > > Hello Nick, > >

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-09-26 Thread Matthias Kaehlcke
On Fri, Aug 31, 2018 at 09:46:02AM -0700, Nick Desaulniers wrote: > On Tue, Aug 28, 2018 at 4:00 PM Nick Desaulniers > wrote: > > > > On Mon, Aug 27, 2018 at 1:42 PM Daniel Santos > > wrote: > > > > > > Hello Nick, > > > > > > On 08/27/2018 03:09 PM, Nick Desaulniers wrote: > > > >>> Let's give

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-31 Thread Nick Desaulniers
On Tue, Aug 28, 2018 at 4:00 PM Nick Desaulniers wrote: > > On Mon, Aug 27, 2018 at 1:42 PM Daniel Santos wrote: > > > > Hello Nick, > > > > On 08/27/2018 03:09 PM, Nick Desaulniers wrote: > > >>> Let's give up __compiletime_assert_fallback(). This commit does not > > >>> change the current beha

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-28 Thread Nick Desaulniers
On Mon, Aug 27, 2018 at 1:42 PM Daniel Santos wrote: > > Hello Nick, > > On 08/27/2018 03:09 PM, Nick Desaulniers wrote: > >>> Let's give up __compiletime_assert_fallback(). This commit does not > >>> change the current behavior since it just rips off the useless code. > >> Clang is not the only

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-28 Thread Masahiro Yamada
2018-08-28 19:55 GMT+09:00 Arnd Bergmann : > On Mon, Aug 27, 2018 at 10:44 PM Daniel Santos > wrote: >> >> On 08/27/2018 03:09 PM, Nick Desaulniers wrote: >> >> Now we're back to the question of "what do you mean by 'constant'"? If >> >> you mean a C constant expression (as defined in the C stan

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-28 Thread Arnd Bergmann
On Mon, Aug 27, 2018 at 10:44 PM Daniel Santos wrote: > > On 08/27/2018 03:09 PM, Nick Desaulniers wrote: > >> Now we're back to the question of "what do you mean by 'constant'"? If > >> you mean a C constant expression (as defined in the C standard) than > >> almost none of this code fits that c

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Nick Desaulniers
On Mon, Aug 27, 2018 at 1:42 PM Daniel Santos wrote: > > Hello Nick, > > On 08/27/2018 03:09 PM, Nick Desaulniers wrote: > >> Now we're back to the question of "what do you mean by 'constant'"? If > >> you mean a C constant expression (as defined in the C standard) than > >> almost none of this c

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Daniel Santos
Hello Nick, On 08/27/2018 03:09 PM, Nick Desaulniers wrote: >> Now we're back to the question of "what do you mean by 'constant'"? If >> you mean a C constant expression (as defined in the C standard) than >> almost none of this code fits that criteria. For these compile-time >> assertions to wo

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Nick Desaulniers
On Mon, Aug 27, 2018 at 1:05 PM Daniel Santos wrote: > > Hello Masahiro, > > > On 08/25/2018 01:16 PM, Masahiro Yamada wrote: > > __compiletime_assert_fallback() is supposed to stop building earlier > > by using the negative-array-size method in case the compiler does not > > support "error" attri

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Daniel Santos
Hello Masahiro, On 08/25/2018 01:16 PM, Masahiro Yamada wrote: > __compiletime_assert_fallback() is supposed to stop building earlier > by using the negative-array-size method in case the compiler does not > support "error" attribute, but has never worked like that. > > You can simply try: > >