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: <201106202209.35152.arnd@arndb.de>
Date:	Mon, 20 Jun 2011 22:09:34 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Alan Stern <stern@...land.harvard.edu>,
	Alexander Holler <holler@...oftware.de>, gregkh@...e.de,
	Nicolas Pitre <nico@...xnic.net>, linux-usb@...r.kernel.org,
	lkml <linux-kernel@...r.kernel.org>, Rabin Vincent <rabin@....in>
Subject: Re: [PATCH] USB: ehci: use packed,aligned(4) instead of removing the packed attribute

On Monday 20 June 2011 20:39:02 Alan Stern wrote:
> On Mon, 20 Jun 2011, Alexander Holler wrote:
> 
> > I see it that way: packed is needed to be sure that at least for struct 
> > ehci_regs there are no padding bytes inbetween the members.
> 
> But is it really needed?

No. When the structure is marked packed, it's broken because it relies
on undefined behavior. If it's not packed, there is no problem.

> > It might 
> > work without, but that depends on the compiler (-version, architecture, 
> > whatever).
> 
> Have there ever been any combinations of compiler, version, 
> architecture, whatever, that had unwanted padding bytes in this 
> structure?

Only on compilers that are not able to build Linux kernels anyway.

	Arnd
--
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