[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdW0v5NuQ4tWZ1PCDT=ze4eSNTf0eG9mKK0SfMrgFs9wiw@mail.gmail.com>
Date: Mon, 21 Jan 2019 10:42:06 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] m68k/atari: Avoid VLA use in atari_switches_setup()
On Tue, Jan 8, 2019 at 2:47 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> On Tue, Jan 8, 2019 at 2:25 PM Arnd Bergmann <arnd@...db.de> wrote:
> > On Mon, Jan 7, 2019 at 10:29 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > > With gcc 7.3.0:
> > >
> > > arch/m68k/atari/config.c: In function ‘atari_switches_setup’:
> > > arch/m68k/atari/config.c:151:2: warning: ISO C90 forbids variable length array ‘switches’ [-Wvla]
> > > char switches[strlen(str) + 1];
> > > ^~~~
> > >
> > > Replace the variable size by the maximum kernel command line size (512
> > > bytes), which is an upper limit for all suboptions.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> >
> > Seems fine as long as COMMAND_LINE_SIZE never grows a lot. Some
>
> If that ever happens, it will be caught by -Wframe-larger-than=1024.
>
> > architectures use 1024 or 2048, but m68k currently has 256 (you write
> > 512 here).
>
> Thanks for noticing, will fix!
Thanks, fixed, and applied and queued for v5.1.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists