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-prev] [day] [month] [year] [list]
Message-ID: <ZnVycQASAhN2Shfu@shell.armlinux.org.uk>
Date: Fri, 21 Jun 2024 13:30:41 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Csókás Bence <csokas.bence@...lan.hu>
Cc: Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Vladimir Oltean <olteanv@...il.com>,
	trivial@...nel.org, Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH v2 resub 1/2] net: include: mii: Refactor: Define LPA_*
 in terms of ADVERTISE_*

On Fri, Jun 21, 2024 at 09:48:23AM +0200, Csókás Bence wrote:
> Hi
> 
> On 6/20/24 21:07, Andrew Lunn wrote:
> > On Wed, Jun 19, 2024 at 02:46:22PM +0200, Csókás, Bence wrote:
> > > Ethernet specification mandates that these bits will be equal.
> > > To reduce the amount of magix hex'es in the code, just define
> > > them in terms of each other.
> > 
> > I have a quick email exchange with other PHY maintainers, and we
> > agree. We will reject these changes, they are just churn and bring no
> > real benefit.
> > 
> > NACK
> > 
> >      Andrew
> > 
> 
> The benefit is that I don't have to constantly convert between "n-th bit
> set" (which is how virtually all datasheets, specifications, documentation
> etc. represent MII bits) and these hex values. In most places in the kernel,
> register bits are already represented with BIT() et al., so why not here?

These are user API files, you can't use BIT() here (BIT() isn't defined
for userspace header files.) Next, these are 'int's not 'longs' so
using BIT() or _BITUL() could cause warnings - plus it changes the
type of these definitions not only for kernel space but also user space.
Thus, it's an API change.

So no, we're not making changes to make this "more readable" at the
expense of breaking the kernel's UAPI.

Just get used to working with hex numbers like most of us had to do
before BIT() was added to the kernel... it's not difficult, each hex
digit is after all four binary bits. It's not like it's decimal.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ