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: <CAMZdPi-Nrus0JrHpjg02QaVwr0TKGU=p96BjXAtd4LALAvk2HQ@mail.gmail.com>
Date:   Mon, 7 Dec 2020 17:45:17 +0100
From:   Loic Poulain <loic.poulain@...aro.org>
To:     subashab@...eaurora.org
Cc:     stranche@...eaurora.org,
        Network Development <netdev@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH] net: rmnet: Adjust virtual device MTU on real device capability

Hi Subash,

On Fri, 4 Dec 2020 at 22:56, <subashab@...eaurora.org> wrote:
>
> On 2020-12-03 10:40, Loic Poulain wrote:
> > A submitted qmap/rmnet packet size can not be larger than the linked
> > interface (real_dev) MTU. This patch ensures that the rmnet virtual
> > iface MTU is configured according real device capability.
> >
> > Signed-off-by: Loic Poulain <loic.poulain@...aro.org>
[...]
> > @@ -242,6 +247,9 @@ int rmnet_vnd_newlink(u8 id, struct net_device
> > *rmnet_dev,
> >
> >       priv->real_dev = real_dev;
> >
> > +     /* Align default MTU with real_dev MTU */
> > +     rmnet_vnd_change_mtu(rmnet_dev, real_dev->mtu -
> > RMNET_NEEDED_HEADROOM);
> > +
> >       rc = register_netdevice(rmnet_dev);
> >       if (!rc) {
> >               ep->egress_dev = rmnet_dev;
>
> This would need similar checks in the NETDEV_PRECHANGEMTU
> netdev notifier.

What about just returning an error on NETDEV_PRECHANGEMTU notification
to prevent real device MTU change while virtual rmnet devices are
linked? Not sure there is a more proper and thread safe way to manager
that otherwise.

Regards,
Loic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ