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: <4cad6137-ac69-4253-9f45-ce51e90c081f@quicinc.com>
Date: Fri, 16 Feb 2024 08:58:37 -0800
From: Jeff Johnson <quic_jjohnson@...cinc.com>
To: Michal Kubecek <mkubecek@...e.cz>, Denis Kirjanov <kirjanov@...il.com>
CC: <netdev@...r.kernel.org>, Denis Kirjanov <dkirjanov@...e.de>
Subject: Re: [PATCH ethtool] move variable-sized members to the end of structs

On 2/16/2024 6:57 AM, Michal Kubecek wrote:
> On Fri, Feb 16, 2024 at 09:08:53AM -0500, Denis Kirjanov wrote:
>> The patch fixes the following clang warnings:
>>
>> warning: field 'xxx' with variable sized type 'xxx' not at the end of a struct
>>  or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
>>
>> Signed-off-by: Denis Kirjanov <dkirjanov@...e.de>
> 
> Have you checked if this does not break the ioctl interface? Many of
> these structures (maybe even all of them) are directly passed to kernel
> via ioctl so that rearranging them would break the data block format
> expected by kernel.
> 
> AFAICS at least in the cases that I checked, the outer struct member is
> exactly the data expected as variable part of the inner struct.
> 
> Michal

Yes, it seems the correct solution is to just remove from struct
ethtool_link_settings:
	__u32	link_mode_masks[];

This is unused in the driver, and the mask-handing command creates an
ecmd which appends the masks

However this is a UAPI struct, so this potentially breaks userspace
compilation (but not the UABI).

/jeff


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ