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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 04 Mar 2009 11:06:41 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	David Miller <davem@...emloft.net>
CC:	nhorman@...driver.com, zbr@...emap.net, netdev@...r.kernel.org,
	kuznet@....inr.ac.ru, pekkas@...core.fi, jmorris@...ei.org,
	yoshfuji@...ux-ipv6.org
Subject: Re: [Patch 4/5] Network Drop Monitor: Adding drop monitor implementation
 & Netlink protocol

David Miller wrote:
> From: Neil Horman <nhorman@...driver.com>
> Date: Tue, 3 Mar 2009 14:21:07 -0500
> 
>> On Tue, Mar 03, 2009 at 09:19:09PM +0300, Evgeniy Polyakov wrote:
>>>> +struct net_dm_config_msg {
>>>> +	size_t entries;
>>>> +	struct net_dm_config_entry options[0];
>>>> +};
>>> Isn't size_t have different size on different platforms?
>>>
>> Probably, but we're only sending this data over netlink sockets, so despite the
>> platform, I don't really see this as an issue.  About the only place for concern
>> I think are cases like x86_64 and ppc64, in the event you have a 64 bit kernel
>> and 32 bit user space, and in those the app can be adjusted to compensate for
>> this.  I suppose I can fixate the size if its a real concern, but I don't think
>> it really is.
> 
> Neil, that is _THE_ concern.  You have to use portable types that
> will be both sized and aligned identically on both 32-bit and
> 64-bit variants of a given platform.
> 
> This means size_t is absolutely not usable.
> 
> We really don't have a clean way to add compat layer translators
> for netlink, so you have to get this right from the beginning.

It should also be noted that netlink attributes only provide 4 byte
alignment. Not sure what the current status of handling unaligned
accesses on all architectures is, but something that might have to
be taken into consideration.
--
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