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-next>] [day] [month] [year] [list]
Date:   Wed,  7 Dec 2022 15:17:26 -0800
From:   Jesse Brandeburg <jesse.brandeburg@...el.com>
To:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com
Cc:     netdev@...r.kernel.org, mkubecek@...e.cz,
        Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: [PATCH net-next v1 0/2] ethtool: use bits.h defines

Change the ethtool files in the kernel, including uapi header files, to
use the kernel style BIT() and BIT_ULL() functions instead of
open-coding bit shift operations.

Making this change results in a more consistent presentation of bit-
shift operations as well as reduces the further likelihood of mistaken
(1 << 31) usage which omits the 1UL that is necessary to get an unsigned
result of the shift.

Jesse Brandeburg (2):
  ethtool/uapi: use BIT for bit-shifts
  ethtool: refactor bit-shifts

 include/linux/ethtool.h              |   2 +-
 include/uapi/linux/ethtool.h         | 112 ++++++++++++++++-----------
 include/uapi/linux/ethtool_netlink.h |   6 +-
 net/ethtool/bitset.c                 |  14 ++--
 net/ethtool/ioctl.c                  |   4 +-
 net/ethtool/strset.c                 |   6 +-
 6 files changed, 84 insertions(+), 60 deletions(-)


base-commit: 01d0e110f2365151d8e69ca4978128112637642d
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ