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, 28 Oct 2011 15:50:04 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, Russell King <linux@....linux.org.uk>
Subject: Re: [PATCH] RFC: fs to be compiled with -Dlinux

On Fri, Oct 28, 2011 at 3:05 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:

> So you need to add it to some CFLAGS at your own build infrastructure,
> not in fs/Makefile.

Sure, fixing. I don't have much of an infrastructure, mainly using a
simple makefile so it's a simple thing to fix up.

> That said, we *probably* should also look at making anything that the
> kernel build uses replace something like
>
>  #ifdef linux  (or __linux__)
>
> with
>
>  #if defined(linux) || defined(__KERNEL__)
>
> so that we can always rely on just the normal __KERNEL__ define rather
> than depending on the compiler being properly set up for
> cross-compiling for Linux.

Something like this?

>From 929a7556d27f752466477e2e834e02fb4bd9922e Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@...ricsson.com>
Date: Fri, 28 Oct 2011 15:43:22 +0200
Subject: [PATCH] aout: depend on linux or __KERNEL__

As suggested by Torvalds the kernel build should only depend
on __KERNEL__ being set and not rely on compiler definitions
like "linux" or "__linux__".

Signed-off-by: Linus Walleij <linus.walleij@...ricsson.com>
---
 include/linux/a.out.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index e86dfca..45ea44a 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -129,7 +129,7 @@ enum machine_type {
 #define SEGMENT_SIZE PAGE_SIZE
 #endif

-#ifdef linux
+#if defined(linux) || defined(__KERNEL__)
 #ifdef __KERNEL__
 #include <asm/page.h>
 #else
-- 
1.7.3.2

Yours,
Linus Walleij
--
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