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: <CAOMdWSKgpfk=VvCYLjouAVC7Z9fFrh-bCHs0phJrjBgLenVpfw@mail.gmail.com>
Date:   Fri, 11 Sep 2020 11:23:39 +0530
From:   Allen <allen.lkml@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     jes@...ined-monkey.org, Jakub Kicinski <kuba@...nel.org>,
        dougmill@...ux.ibm.com, cooldavid@...ldavid.org,
        mlindner@...vell.com, stephen@...workplumber.org,
        borisp@...lanox.com, netdev@...r.kernel.org,
        Romain Perier <romain.perier@...il.com>
Subject: Re: [PATCH v2 01/20] ethernet: alteon: convert tasklets to use new
 tasklet_setup() API

>
> >>
> >> > @@ -1562,10 +1562,11 @@ static void ace_watchdog(struct net_device *data, unsigned int txqueue)
> >> >  }
> >> >
> >> >
> >> > -static void ace_tasklet(unsigned long arg)
> >> > +static void ace_tasklet(struct tasklet_struct *t)
> >> >  {
> >> > -     struct net_device *dev = (struct net_device *) arg;
> >> > -     struct ace_private *ap = netdev_priv(dev);
> >> > +     struct ace_private *ap = from_tasklet(ap, t, ace_tasklet);
> >> > +     struct net_device *dev = (struct net_device *)((char *)ap -
> >> > +                             ALIGN(sizeof(struct net_device), NETDEV_ALIGN));
> >> >       int cur_size;
> >> >
> >>
> >> I don't see this is as an improvement.  The 'dev' assignment looks so
> >> incredibly fragile and exposes so many internal details about netdev
> >> object allocation, alignment, and layout.
> >>
> >> Who is going to find and fix this if someone changes how netdev object
> >> allocation works?
> >>
> >
> > Thanks for pointing it out. I'll see if I can fix it to keep it simple.
>
> Just add a backpointer to the netdev from the netdev_priv() if you
> absolutely have too.
>

Okay.

> >> I don't want to apply this, it sets a very bad precedent.  The existing
> >> code is so much cleaner and easier to understand and audit.
> >
> > Will you pick the rest of the patches or would they have to wait till
> > this one is
> > fixed.
>
> I never pick up a partial series, ever.  So yes you will have to fix these
> two patches up and resubmit the entire thing.
>

Sure, let me get these fixed up and ready. Thanks.

-- 
       - Allen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ