Skip to content

net: split and rework .ndo_ioctl callback handling

Ivan Vecera requested to merge ivecera/centos-stream-9:bz2008927 into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2008927

The callback .ndo_ioctl() was reworked in upstream v5.15 and its purpose was spliced into several new callbacks. Because RHEL-9 kernel is based on upstream v5.14 and this change would not be backportable after KABI freeze we need to backport these changes prior 9.0 GA. The series contains two upstream series 7c57706b4be5cf ("Merge branch 'ndo_ioctl-rework'") and its dependency 090597b4a9c1b8 ("Merge branch 'net-remove-compat-alloc-user-space'").

Main changes introduced by this series:

  • split out all the users of SIOCDEVPRIVATE ioctls into a separate ndo_siocdevprivate callback, to better see what gets used where
  • fix compat handling for those drivers that pass data directly inside of 'ifreq' rather than using an indirect ifr_data pointer
  • remove unreachable code in ndo_ioctl handlers that relies on command codes we never pass into that, in particular for wireless drivers
  • split out the ethernet specific ioctls into yet another ndo_eth_ioctl callback, as these are by far the most common use of ndo_do_ioctl today
  • split out bonding and wandev ioctls into separate helpers
  • rework the bridge handling with a separate callback

Signed-off-by: Ivan Vecera ivecera@redhat.com

Edited by Ivan Vecera

Merge request reports