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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 6 Mar 2020 18:34:05 +0100 From: Dmitry Vyukov <dvyukov@...gle.com> To: Marc Kleine-Budde <mkl@...gutronix.de> Cc: David Miller <davem@...emloft.net>, Oliver Hartkopp <socketcan@...tkopp.net>, linux-can@...r.kernel.org, netdev <netdev@...r.kernel.org>, syzbot <syzbot+c3ea30e1e2485573f953@...kaller.appspotmail.com>, j.vosburgh@...il.com, vfalico@...il.com, Andy Gospodarek <andy@...yhouse.net>, stable <stable@...r.kernel.org> Subject: Re: [PATCH] bonding: do not enslave CAN devices On Fri, Mar 6, 2020 at 3:12 PM Marc Kleine-Budde <mkl@...gutronix.de> wrote: > > On 3/2/20 8:12 PM, David Miller wrote: > > From: Oliver Hartkopp <socketcan@...tkopp.net> > > Date: Mon, 2 Mar 2020 09:45:41 +0100 > > > >> I don't know yet whether it makes sense to have CAN bonding/team > >> devices. But if so we would need some more investigation. For now > >> disabling CAN interfaces for bonding/team devices seems to be > >> reasonable. > > > > Every single interesting device that falls into a special use case > > like CAN is going to be tempted to add a similar check. > > > > I don't want to set this precedence. > > > > Check that the devices you get passed are actually CAN devices, it's > > easy, just compare the netdev_ops and make sure they equal the CAN > > ones. > > Sorry, I'm not really sure how to implement this check. > > Should I maintain a list of all netdev_ops of all the CAN devices (= > whitelist) and the compare against that list? Having a global list of > pointers to network devices remind me of the old days of kernel-2.4. I think Dave means something like this: $ grep "netdev_ops == " drivers/net/*/*.c net/*/*.c drivers/net/hyperv/netvsc_drv.c: if (event_dev->netdev_ops == &device_ops) drivers/net/ppp/ppp_generic.c: if (dev->netdev_ops == &ppp_netdev_ops) net/dsa/slave.c: return dev->netdev_ops == &dsa_slave_netdev_ops; net/openvswitch/vport-internal_dev.c: return netdev->netdev_ops == &internal_dev_netdev_ops;
Powered by blists - more mailing lists