All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] include/linux/personality.h
@ 2003-07-21 11:42 Hannes Reinecke
  2003-07-21 12:39 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2003-07-21 11:42 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Hi all,

the attached patch encloses the kernel-only parts of personality.h with
__KERNEL__ to prevent them to be visible in userspace. This also fixes
the nameclash between the macro personality() with the syscall
personality() if the header file is included in an userspace program.
Patch is against 2.4.21, should apply to 2.6.0-test1 equally.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux AG				S390 & zSeries
Deutschherrnstr. 15-19			+49 911 74053 688
90429 Nürnberg				http://www.suse.de


[-- Attachment #2: personality.patch --]
[-- Type: text/plain, Size: 729 bytes --]

--- linux-2.4.21-7/include/linux/personality.h.orig	2003-07-21 13:06:24.000000000 +0200
+++ linux-2.4.21-7/include/linux/personality.h	2003-07-21 13:07:53.000000000 +0200
@@ -1,6 +1,8 @@
 #ifndef _LINUX_PERSONALITY_H
 #define _LINUX_PERSONALITY_H
 
+#ifdef __KERNEL__
+
 /*
  * Handling of different ABIs (personalities).
  */
@@ -22,6 +24,7 @@
 extern unsigned long abi_defhandler_libcso;
 extern int abi_fake_utsname;
 
+#endif /* __KERNEL__ */
 
 /*
  * Flags for bug emulation.
@@ -69,6 +72,7 @@
 	PER_MASK =		0x00ff,
 };
 
+#ifdef __KERNEL__
 
 /*
  * Description of an execution domain.
@@ -127,4 +131,6 @@
 		__MOD_DEC_USE_COUNT(ep->module);	\
 } while (0)
 
+#endif /* __KERNEL__ */
+
 #endif /* _LINUX_PERSONALITY_H */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] include/linux/personality.h
  2003-07-21 11:42 [PATCH] include/linux/personality.h Hannes Reinecke
@ 2003-07-21 12:39 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2003-07-21 12:39 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: linux-kernel

On Mon, Jul 21, 2003 at 01:42:11PM +0200, Hannes Reinecke wrote:
> Hi all,
> 
> the attached patch encloses the kernel-only parts of personality.h with
> __KERNEL__ to prevent them to be visible in userspace. This also fixes
> the nameclash between the macro personality() with the syscall
> personality() if the header file is included in an userspace program.
> Patch is against 2.4.21, should apply to 2.6.0-test1 equally.

Don't do that, the header shouldn't be used from userspace.  There's
a sys/personality.h for you in glibc 2.3.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-21 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 11:42 [PATCH] include/linux/personality.h Hannes Reinecke
2003-07-21 12:39 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.