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:	Fri, 29 Feb 2008 16:42:40 -0500
From:	"John W. Linville" <linville@...driver.com>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	Michael Buesch <mb@...sch.de>, David Miller <davem@...emloft.net>,
	gordonfarquharson@...il.com, netdev@...r.kernel.org,
	linux-wireless@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: pull request: wireless-2.6 2008-02-27

On Fri, Feb 29, 2008 at 02:10:58PM -0500, John W. Linville wrote:
> On Fri, Feb 29, 2008 at 05:34:13PM +0100, Johannes Berg wrote:
> > 
> > On Fri, 2008-02-29 at 11:26 -0500, John W. Linville wrote:
> > > On Fri, Feb 29, 2008 at 01:16:59PM +0100, Michael Buesch wrote:
> > > 
> > > > I'm wondering if we can't simply pass a commandline parameter to file2alias
> > > > that tells it whether we are crosscompiling. It should simply omit the sanity check
> > > 
> > > Sounds reasonable to me.
> > 
> > In fact, file2alias shouldn't need a command line argument ...
> > 
> > > > in that case. Is there any easy and reliable way to find out whether we
> > > > are crosscompiling from a makefile (I don't know the makefile core that much)?
> > > 
> > > Non-empty CROSS_COMPILE definition?
> > 
> > ... it can just check whether CROSS_COMPILE is set in its environment.
> > No?
> 
> Not a bad idea...something like this?

That version didn't work -- it seems CROSS_COMPILE is always set,
even if it is empty.

This version seems to work, but it is a bit chatty when CROSS_COMPILE
is set and you build lots of modules...thoughts?

John

---

modpost: avoid user/kernel struct size compat check if cross-compiling

Signed-off-by: John W. Linville <linville@...driver.com>
---
 scripts/mod/file2alias.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 9ddf944..37f311e 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -10,6 +10,7 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 
+#include <stdlib.h>
 #include "modpost.h"
 
 /* We use the ELF typedefs for kernel_ulong_t but bite the bullet and
@@ -62,6 +63,14 @@ static void device_id_check(const char *modname, const char *device_id,
 			    void *symval)
 {
 	int i;
+	char *cross_compile;
+
+	cross_compile = getenv("CROSS_COMPILE");
+	if (cross_compile && strlen(cross_compile)) {
+		warn("%s: cross-compile cannot verify userspace/kernel "
+		     "structure size compatibility.\n", modname);
+		return;
+	}
 
 	if (size % id_size || size < id_size) {
 		fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
-- 
1.5.3.3

-- 
John W. Linville
linville@...driver.com
--
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