lkml.org 
[lkml]   [2006]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] x86: Make _syscallX() macros compile in PIC mode on i386
Andrew Morton wrote:
> But we don't compile the kernel with -fpic... We might want to, for kdump
> convenience at some stage, perhaps.

Unless I am really confused, there should be no place in the kernel that
uses any of the _syscallX() macros. These macros are for the benefit of
userspace, and they get picked up by and distributed with glibc. They
just happen to be shipped and maintained with the kernel.

> If we do, it'd be better to simply replace those _syscallX functions with
> versions which work in either mode, rather than having two versions.

That is certainly possible. The new macros work in both modes, but they
are slightly less efficient than the old macros, if you have access to
%ebx (i.e. in non-PIC code). If you prefer, we could just remove the old
macros and unconditionally replace them with the new ones.

> The syscallX() macros are almost obsolete - it's preferred that code simply
> include syscalls.h and call sys_foo() directly. But there are a few
> hard-to-convert places, iirc.

Are you thinking of the code that jumps through the vdso entry point?
That is not always an easy option for user-space applications which need
to remain backwards compatible to older versions of the kernel and of libc.


Markus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-10 04:06    [W:0.413 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site