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: <01d9fc07-ffaf-4353-b4b2-d7fcaa146024@lunn.ch>
Date: Sat, 20 Apr 2024 16:17:50 +0200
From: Andrew Lunn <andrew@...n.ch>
To: renjun wang <renjunw0@...mail.com>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: phy: update fields of mii_ioctl_data for
 transferring C45 data.

On Sat, Apr 20, 2024 at 08:41:10AM +0800, renjun wang wrote:
> The phy_id is used as u32 type in function mdio_phy_id_is_c45()
> with the 30th bit for distinguishing C22 and C45. The reg_num is
> also used as u32 type in function mdiobus_c45_read() or someplace
> else. For more C45 information needed and data structure alignment
> consideration, change these two fields to __u32 type which can make
> user space program transferring clause 45 type information to kernel
> directly.
> 
> Signed-off-by: renjun wang <renjunw0@...mail.com>
> ---
>  include/uapi/linux/mii.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/mii.h b/include/uapi/linux/mii.h

Just adding a general point to others comments. You have to be very
careful with changes to files inside include/uapi. These define the
API between user space and the kernel. You cannot make changes which
break existing binaries of user space tools.

Sometimes you can add new members to the end of a structure. Sometimes
you can add new enum values after all other enums, but you cannot make
changes in the middle.


    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ