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]
Date:	Mon, 11 Apr 2011 18:10:57 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Alexander Duyck <alexander.h.duyck@...el.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] ethtool: Compat handling for struct
 ethtool_rxnfc

On Mon, 2011-02-28 at 18:22 +0000, Ben Hutchings wrote:
> This structure was accidentally defined such that its layout can
> differ between 32-bit and 64-bit processes.  Add compat structure
> definitions and functions to copy from/to user-space with the
> necessary adjustments.

Damnit, we have to do the same thing for struct ethtool_rx_ntuple:

$ cc -m64 test.c
$ ./a.out
sizeof(struct ethtool_rx_ntuple) = 184
offsetof(ethtool_rx_ntuple, fs) = 8
offsetof(ethtool_rx_ntuple_flow_spec, vlan_tag) = 148
offsetof(ethtool_rx_ntuple_flow_spec, data) = 152
$ cc -m32 test.c
$ ./a.out
sizeof(struct ethtool_rx_ntuple) = 176
offsetof(ethtool_rx_ntuple, fs) = 4
offsetof(ethtool_rx_ntuple_flow_spec, vlan_tag) = 148
offsetof(ethtool_rx_ntuple_flow_spec, data) = 152

At least there's only one hole to deal with in this case.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ