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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5j+k6SkGP19EYxOAvwy+uzvkJ664_Lj_Rz5t8a6Fi60+JQ@mail.gmail.com>
Date:   Fri, 9 Mar 2018 10:35:55 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Eric Anholt <eric@...olt.net>
Cc:     "Tobin C. Harding" <me@...in.cc>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Stefan Wahren <stefan.wahren@...e.com>,
        Kernel Hardening <kernel-hardening@...ts.openwall.com>,
        LKML <linux-kernel@...r.kernel.org>,
        driverdev-devel@...uxdriverproject.org,
        Tycho Andersen <tycho@...ho.ws>
Subject: Re: [PATCH] staging: vchiq_arm: Clear VLA warning

On Fri, Mar 9, 2018 at 10:11 AM, Eric Anholt <eric@...olt.net> wrote:
> "Tobin C. Harding" <me@...in.cc> writes:
>
>> The kernel would like to have all stack VLA usage removed[1].  The
>> array here is fixed (declared with a const variable) but it appears
>> like VLA to the compiler.  We can use a pre-processor define to quiet
>> the compiler.
>>
>> [1]: https://lkml.org/lkml/2018/3/7/621
>>
>> Signed-off-by: Tobin C. Harding <me@...in.cc>
>> ---
>>
>> The name of this constant may need changing, there is already a
>> pre-processor constant VCHIQ_MAX_SERVICES
>
> Maybe just use ARRAY_SIZE(local_max_services) and not have the #define?

I think you mean ARRAY_SIZE(service_data) ? In that case, yeah, it
seems like a raw "64" for the array size can be used instead.

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ