Re: [PATCH] net: phy: TLK10X initial driver submission

2018-04-19 Thread Miguel Ojeda
On Thu, Apr 19, 2018 at 10:28 AM, Måns Andersson wrote: > From: Mans Andersson > > Add suport for the TI TLK105 and TLK106 10/100Mbit ethernet phys. > Hi Mans, Some quick notes. > In addition the TLK10X needs to be removed from DP83848 driver as

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 9:14 PM, Linus Torvalds <torva...@linux-foundation.org> wrote: > On Fri, Mar 16, 2018 at 1:03 PM, Miguel Ojeda > <miguel.ojeda.sando...@gmail.com> wrote: >>> >>> Kees - is there some online "gcc-4.4 checker" somewhere? This

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 9:14 PM, Linus Torvalds <torva...@linux-foundation.org> wrote: > On Fri, Mar 16, 2018 at 1:03 PM, Miguel Ojeda > <miguel.ojeda.sando...@gmail.com> wrote: >>> >>> Kees - is there some online "gcc-4.4 checker" somewhere? This

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 8:27 PM, Linus Torvalds wrote: > On Fri, Mar 16, 2018 at 10:55 AM, Al Viro wrote: >> >> That's not them, that's C standard regarding ICE. > > Yes. The C standard talks about "integer constant expression". I know. >

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 12:49 AM, Kees Cook wrote: > On Thu, Mar 15, 2018 at 4:46 PM, Linus Torvalds > wrote: >> What I'm *not* so much ok with is "const_max(5,sizeof(x))" erroring >> out, or silently causing insane behavior due to hidden

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 12:08 AM, Miguel Ojeda <miguel.ojeda.sando...@gmail.com> wrote: > On Thu, Mar 15, 2018 at 11:58 PM, Miguel Ojeda > <miguel.ojeda.sando...@gmail.com> wrote: >> On Thu, Mar 15, 2018 at 11:46 PM, Kees Cook <keesc...@chromium.org> wrote: &

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Thu, Mar 15, 2018 at 11:58 PM, Miguel Ojeda <miguel.ojeda.sando...@gmail.com> wrote: > On Thu, Mar 15, 2018 at 11:46 PM, Kees Cook <keesc...@chromium.org> wrote: >> >> By using this eye-bleed: >> >> size_t __error_not_const_arg(void) \ >> __compile

Re: [PATCH v4 1/2] kernel.h: Introduce const_max() for VLA removal

2018-03-15 Thread Miguel Ojeda
On Thu, Mar 15, 2018 at 11:46 PM, Kees Cook wrote: > On Thu, Mar 15, 2018 at 3:23 PM, Linus Torvalds > wrote: >> On Thu, Mar 15, 2018 at 3:16 PM, Kees Cook wrote: >>> >>> size_t __error_not_const_arg(void) \ >>>

Re: [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage

2018-03-13 Thread Miguel Ojeda
On Sun, Mar 11, 2018 at 12:12 AM, Kees Cook wrote: > > The problem is that it's not a "constant expression", so the compiler > frontend still yells about it under -Wvla. I would characterize this > mainly as a fix for "accidental VLA" or "misdetected VLA" or something >

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-10 Thread Miguel Ojeda
On Sat, Mar 10, 2018 at 6:51 PM, Linus Torvalds wrote: > > So in *historical* context - when a compiler didn't do variable length > arrays at all - the original semantics of C "constant expressions" > actually make a ton of sense. > > You can basically think of a

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-10 Thread Miguel Ojeda
On Sat, Mar 10, 2018 at 5:30 PM, Linus Torvalds wrote: > On Sat, Mar 10, 2018 at 7:33 AM, Kees Cook wrote: >> >> Alright, I'm giving up on fixing max(). I'll go back to STACK_MAX() or >> some other name for the simple macro. Bleh. > > Oh, and

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-09 Thread Miguel Ojeda
On Sat, Mar 10, 2018 at 7:10 AM, Miguel Ojeda <miguel.ojeda.sando...@gmail.com> wrote: > On Sat, Mar 10, 2018 at 4:11 AM, Randy Dunlap <rdun...@infradead.org> wrote: >> On 03/09/2018 04:07 PM, Andrew Morton wrote: >>> On Fri, 9 Mar 2018 12:05:36 -0800 Kees Cook

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-09 Thread Miguel Ojeda
On Sat, Mar 10, 2018 at 4:11 AM, Randy Dunlap wrote: > On 03/09/2018 04:07 PM, Andrew Morton wrote: >> On Fri, 9 Mar 2018 12:05:36 -0800 Kees Cook wrote: >> >>> When max() is used in stack array size calculations from literal values >>> (e.g. "char