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-next>] [day] [month] [year] [list]
Message-Id: <20230402123755.2592507-1-vladimir.oltean@nxp.com>
Date:   Sun,  2 Apr 2023 15:37:48 +0300
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Maxim Georgiev <glipus@...il.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Köry Maincent <kory.maincent@...tlin.com>,
        Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: [PATCH net-next 0/7] Convert dsa_master_ioctl() to netdev notifier

This is preparatory work in order for Maxim Georgiev to be able to start
the API conversion process of hardware timestamping from ndo_eth_ioctl()
to ndo_hwtstamp_set():
https://lore.kernel.org/netdev/20230331045619.40256-1-glipus@gmail.com/

In turn, Maxim Georgiev's work is a preparation so that Köry Maincent is
able to make the active hardware timestamping layer selectable by user
space.
https://lore.kernel.org/netdev/20230308135936.761794-1-kory.maincent@bootlin.com/

So, quite some dependency chain.

Before this patch set, DSA prevented the conversion of any networking
driver from the ndo_eth_ioctl() API to the ndo_hwtstamp_set() API,
because it wanted to validate the hwtstamping settings on the DSA
master, and it was only coded up to do this using the old API.

After this patch set, a new netdev notifier exists, which does not
depend on anything that would constitute the "soon-to-be-legacy" API,
but rather, it uses a newly introduced struct kernel_hwtstamp_config,
and it doesn't issue any ioctl at all, being thus compatible both with
ndo_eth_ioctl(), and with the not-yet-introduced, but now possible,
ndo_hwtstamp_set().

Vladimir Oltean (7):
  net: don't abuse "default" case for unknown ioctl in dev_ifsioc()
  net: simplify handling of dsa_ndo_eth_ioctl() return code
  net: promote SIOCSHWTSTAMP and SIOCGHWTSTAMP ioctls to dedicated
    handlers
  net: move copy_from_user() out of net_hwtstamp_validate()
  net: add struct kernel_hwtstamp_config and make
    net_hwtstamp_validate() use it
  net: dsa: make dsa_port_supports_hwtstamp() construct a fake ifreq
  net: create a netdev notifier for DSA to reject PTP on DSA master

 include/linux/net_tstamp.h |  33 +++++++++++
 include/linux/netdevice.h  |   9 ++-
 include/net/dsa.h          |  51 -----------------
 net/core/dev.c             |   8 +--
 net/core/dev_ioctl.c       | 110 ++++++++++++++++++++++---------------
 net/dsa/master.c           |  50 +++++------------
 net/dsa/master.h           |   3 +
 net/dsa/port.c             |  10 ++--
 net/dsa/port.h             |   2 +-
 net/dsa/slave.c            |  11 ++++
 10 files changed, 147 insertions(+), 140 deletions(-)
 create mode 100644 include/linux/net_tstamp.h

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ