lkml.org 
[lkml]   [2018]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] fixup! firmware: raspberrypi: Remove VLA usage
    On Mon, Jul 2, 2018 at 12:45 PM, Eric Anholt <eric@anholt.net> wrote:
    > Kees - with this fix to your patch, the kernel boots again (otherwise,
    > the FW would try to parse the uninitialized bits of stack and throw
    > errors). If you're good with me squashing this in, I'll do so and
    > send it to -next.
    >
    > Signed-off-by: Eric Anholt <eric@anholt.net>
    > ---
    > drivers/firmware/raspberrypi.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
    > index b80f15214b73..a200a2174611 100644
    > --- a/drivers/firmware/raspberrypi.c
    > +++ b/drivers/firmware/raspberrypi.c
    > @@ -162,7 +162,7 @@ int rpi_firmware_property(struct rpi_firmware *fw,
    > memcpy(data + sizeof(struct rpi_firmware_property_tag_header),
    > tag_data, buf_size);
    >
    > - ret = rpi_firmware_property_list(fw, &data, sizeof(data));
    > + ret = rpi_firmware_property_list(fw, &data, buf_size + sizeof(*header));
    > memcpy(tag_data,
    > data + sizeof(struct rpi_firmware_property_tag_header),
    > buf_size);

    Eek! Yes, thank you. Yeah, please feel free to squash. Thanks for testing!

    -Kees

    --
    Kees Cook
    Pixel Security

    \
     
     \ /
      Last update: 2018-07-02 23:06    [W:2.907 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site