This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PATCH: Add sys/personality (Re: Personality)
- From: Carsten Langgaard <carstenl at mips dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Ralf Baechle <ralf at oss dot sgi dot com>, GNU C Library <libc-alpha at sources dot redhat dot com>, linux-mips at oss dot sgi dot com
- Date: Tue, 16 Jul 2002 21:16:48 +0200
- Subject: Re: PATCH: Add sys/personality (Re: Personality)
- Organization: MIPS Technologies
- References: <3D33DAB2.353A4399@mips.com> <20020716123632.B17038@dea.linux-mips.net> <20020716090728.A22128@lucon.org>
Thanks.
Now that we are at it, what should personality return in case it's called with a
value, which isn't defined in the personality.h file.
Should it return -EINVAL ?
I don't think, that is the case at the moment, I believe you can set personality
to anything.
/Carsten
"H. J. Lu" wrote:
> On Tue, Jul 16, 2002 at 12:36:32PM +0200, Ralf Baechle wrote:
> > On Tue, Jul 16, 2002 at 10:34:58AM +0200, Carsten Langgaard wrote:
> >
> > > The include/linux/personality.h file has changed between the 2.4.3 and
> > > the 2.4.18 kernel.
> > > Now there is a define of personality (#define personality(pers) (pers &
> > > PER_MASK), but that breaks things for the users, if they include this
> > > file.
> > > The user wishes to call the glibc personality function (which do the
> > > syscall), and not use the above definition.
> > >
> > > So I guess we need a "#ifdef __KERNEL__" around some of the code in
> > > include/linux/personality.h (at least around the define of personality),
> > > which then has to go into the glibc kernel header files.
> >
> > The general policy about such problems is to not use kernel include files
> > from user applications directly. Hjl - maybe time for <sys/personality.h>?
> >
>
> Here is a patch.
>
> H.J.
>
> ------------------------------------------------------------------------
>
> glibc-personality.patchName: glibc-personality.patch
> Type: Plain Text (text/plain)