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:	Sat, 09 Sep 2006 12:29:31 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	torvalds@...l.org
Cc:	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH] [4/6] Move kernel-only #includes within <asm-i386/elf.h>

Some files which don't exist in userspace were being included
unconditionally in asm-i386/elf.h. Move the offending #includes down a
few lines so that they're protected by #ifdef __KERNEL__

In fact, we probably want to kill off all userspace use of asm/elf.h --
but we aren't there yet, so we should at least make it possible to
include it for now.

Signed-off-by: David Woodhouse <dwmw2@...radead.org>

diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h
index 1eac92c..db4344d 100644
--- a/include/asm-i386/elf.h
+++ b/include/asm-i386/elf.h
@@ -7,10 +7,7 @@ #define __ASMi386_ELF_H
 
 #include <asm/ptrace.h>
 #include <asm/user.h>
-#include <asm/processor.h>
-#include <asm/system.h>		/* for savesegment */
 #include <asm/auxvec.h>
-#include <asm/desc.h>
 
 #include <linux/utsname.h>
 
@@ -48,6 +45,12 @@ #define ELF_CLASS	ELFCLASS32
 #define ELF_DATA	ELFDATA2LSB
 #define ELF_ARCH	EM_386
 
+#ifdef __KERNEL__
+
+#include <asm/processor.h>
+#include <asm/system.h>		/* for savesegment */
+#include <asm/desc.h>
+
 /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
    contains a pointer to a function which might be registered using `atexit'.
    This provides a mean for the dynamic linker to call DT_FINI functions for
@@ -111,7 +114,6 @@ #define ELF_HWCAP	(boot_cpu_data.x86_cap
 
 #define ELF_PLATFORM  (system_utsname.machine)
 
-#ifdef __KERNEL__
 #define SET_PERSONALITY(ex, ibcs2) do { } while (0)
 
 /*

-- 
dwmw2

-
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