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]
Message-ID: <AANLkTikBcuYa_HNzhYYG62CLjcfptQNQM_zOsv9fXRfS@mail.gmail.com>
Date:	Mon, 23 Aug 2010 10:29:49 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	arnd@...db.de, eric.dumazet@...il.com,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] net: define __packed for the userspace code

On Mon, Aug 23, 2010 at 9:36 AM, David Miller <davem@...emloft.net> wrote:
>
> I don't think this it the reason it was being used here.
>
> Any, for one thing, we definitely cannot remove the existing packed
> markers or else we will break every single userland tool out there
> using these socket address structures.
>
> Even the first two members (sa_family_t and unsigned int) will be
> positioned differently if we remove the marker.
>
> I suspect the packed attribute is there to make sure the pppo* socket
> address structures fit within the generic socket address object size.
> (see struct __kernel_sockaddr_storage and struct sockaddr).
>
> As to the problem at-hand, I think we need to use __attribute__((packed))
> here.  And that's what I'll commit into net-2.6 and net-next-2.6
>

Do you mean that use the __attribute__((packed)) annotation in all of
these files:

localhost linux # grep "\<__packed\>" usr/include/ -r | uniq
usr/include/linux/if_hippi.h:} __packed;
usr/include/linux/if_fddi.h:} __packed;
usr/include/linux/nbd.h:} __packed;
usr/include/linux/ncp.h:} __packed;
usr/include/linux/rfkill.h:} __packed;
usr/include/linux/if_pppox.h:} __packed;
usr/include/linux/phonet.h:} __packed;
usr/include/linux/ipv6.h:} __packed;    /* required for some archs */
usr/include/linux/ipv6.h:} __packed;
usr/include/linux/if_ether.h:} __packed;

-- 
Regards,
Changli Gao(xiaosuo@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ