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]
Date:   Tue, 28 Aug 2018 16:44:57 +0200
From:   Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:     Boris Brezillon <boris.brezillon@...tlin.com>
Cc:     David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        Zhouyang Jia <jiazhouyang09@...il.com>,
        linux-mtd@...ts.infradead.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/8] mtd: maps: gpio-addr-flash: Fix ioremapped size

Hi Boris
On Tue, Aug 28, 2018 at 4:26 PM Boris Brezillon
<boris.brezillon@...tlin.com> wrote:
>
> On Tue, 21 Aug 2018 16:31:46 +0200
> Ricardo Ribalda Delgado <ricardo.ribalda@...il.com> wrote:
>
> > We should only iomap the area of the chip that is memory mapped.
> > Otherwise we could be mapping devices beyond the memory space or that
> > belong to other devices.
> >
>
> Can you add
>
> Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable")


Sure, I have some other changes for the patchset at
https://github.com/ribalda/linux/tree/gpio-addr-flash-v2

I will wait a couple of days for more reviews and I will resend the patches


>
> and in case you want to backport the fix:
>
> Cc: <stable@...r.kernel.org>
>
> > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
> > ---
> >  drivers/mtd/maps/gpio-addr-flash.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
> > index 17be47f72973..6de16e81994c 100644
> > --- a/drivers/mtd/maps/gpio-addr-flash.c
> > +++ b/drivers/mtd/maps/gpio-addr-flash.c
> > @@ -234,7 +234,7 @@ static int gpio_flash_probe(struct platform_device *pdev)
> >       state->map.copy_to    = gf_copy_to;
> >       state->map.bankwidth  = pdata->width;
> >       state->map.size       = state->win_size * (1 << state->gpio_count);
> > -     state->map.virt       = ioremap_nocache(memory->start, state->map.size);
> > +     state->map.virt       = ioremap_nocache(memory->start, state->win_size);
> >       if (!state->map.virt)
> >               return -ENOMEM;
> >
>


-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ