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: <200802231658.46859.mb@bu3sch.de>
Date:	Sat, 23 Feb 2008 16:58:46 +0100
From:	Michael Buesch <mb@...sch.de>
To:	"Gordon Farquharson" <gordonfarquharson@...il.com>
Cc:	"Sam Ravnborg" <sam@...nborg.org>,
	"Russell King" <rmk+lkml@....linux.org.uk>,
	linux-kernel@...r.kernel.org, linville@...driver.com,
	stefano.brivio@...imi.it, "Linus Torvalds" <torvalds@...l.org>,
	"Andrew Morton" <akpm@...l.org>, viro@....linux.org.uk
Subject: Re: [RFC] [PATCH] Fix b43 driver build for arm

On Saturday 23 February 2008 11:14:23 Gordon Farquharson wrote:
> On Fri, Feb 22, 2008 at 10:51 PM, Michael Buesch <mb@...sch.de> wrote:
> >  A big fat comment is something like that:
> >
> >  /* Explicit padding to support a broken sanity check in file2alias.c.
> >   * The check will compare the size of the structure in the kernel
> >   * object file to the userspace the kernel is compiled on.
> >   * This breaks on cross-compilation. This padding is a workaround
> >   * for this. */
> 
> ---
> 
> Align the members of the SSB device structure to a 32 bit boundary so
> that the b43 driver can be built for arm using a cross compiler. This
> alignment is required so that the test in scripts/mod/file2alias.c
> that checks that the size of the device ID type against the size of
> the section in the object file succeeds (see comment and
> http://lkml.org/lkml/2008/2/18/481 for explanation).
> 
> Signed-off-by: Gordon Farquharson <gordonfarquharson@...il.com>

Acked-by: Michael Buesch <mb@...sch.de>

> ---
> 
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 139d49d..208d49a 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -351,7 +351,13 @@ struct sdio_device_id {
>  struct ssb_device_id {
>  	__u16	vendor;
>  	__u16	coreid;
> -	__u8	revision;
> +	/* Explicit padding to support a broken sanity check in file2alias.c.
> +	 * The check compares the size of the structure in the kernel
> +	 * object file to the size of the structure reported in userspace for
> +	 * the system on which the kernel is compiled. The check breaks on
> +	 * cross-compilation, and the padding is a workaround for this. */
> +	__u8	revision
> +		__attribute__((aligned(sizeof(__u32))));
>  };
>  #define SSB_DEVICE(_vendor, _coreid, _revision)  \
>  	{ .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
> 



-- 
Greetings Michael.
--
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