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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuUDwtWJgo7PHJR4kBpQ9mGamTMEaPZBNOZcL3mWFwwZ-zOmw@mail.gmail.com>
Date:   Tue, 24 Sep 2019 23:40:21 +0200
From:   Xue Liu <liuxuenetmail@...il.com>
To:     Stefan Schmidt <stefan@...enfreihafen.org>
Cc:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        "alex. aring" <alex.aring@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        linux-wpan - ML <linux-wpan@...r.kernel.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ieee802154: mcr20a: simplify a bit 'mcr20a_handle_rx_read_buf_complete()'

On Sat, 21 Sep 2019 at 13:52, Stefan Schmidt <stefan@...enfreihafen.org> wrote:
>
> Hello Xue.
>
> On 20.09.19 21:45, Christophe JAILLET wrote:
> > Use a 'skb_put_data()' variant instead of rewritting it.
> > The __skb_put_data variant is safe here. It is obvious that the skb can
> > not overflow. It has just been allocated a few lines above with the same
> > 'len'.
> >
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > ---
> >  drivers/net/ieee802154/mcr20a.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c
> > index 17f2300e63ee..8dc04e2590b1 100644
> > --- a/drivers/net/ieee802154/mcr20a.c
> > +++ b/drivers/net/ieee802154/mcr20a.c
> > @@ -800,7 +800,7 @@ mcr20a_handle_rx_read_buf_complete(void *context)
> >       if (!skb)
> >               return;
> >
> > -     memcpy(skb_put(skb, len), lp->rx_buf, len);
> > +     __skb_put_data(skb, lp->rx_buf, len);
> >       ieee802154_rx_irqsafe(lp->hw, skb, lp->rx_lqi[0]);
> >
> >       print_hex_dump_debug("mcr20a rx: ", DUMP_PREFIX_OFFSET, 16, 1,
> >
>
> Could you please review and ACK this? If you are happy I will take it
> through my tree.
>
> regards
> Stefan Schmidt

Acked-by: Xue Liu <liuxuenetmail@...il.com>

--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ