Re: [PATCH 1/1] x86: Make _syscallX() macros compile in PIC mode on i386

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux