From: Markus Gutschke <markus@google.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, dkegel@google.com
Subject: Re: [PATCH 1/1] x86: Make _syscallX() macros compile in PIC mode on i386
Date: Thu, 09 Mar 2006 19:03:38 -0800 [thread overview]
Message-ID: <4410EC8A.4020808@google.com> (raw)
In-Reply-To: <20060309184759.591e3551.akpm@osdl.org>
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
next prev parent reply other threads:[~2006-03-10 3:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 23:33 [PATCH 1/1] x86: Make _syscallX() macros compile in PIC mode on i386 Markus Gutschke
2006-03-10 2:47 ` Andrew Morton
2006-03-10 3:03 ` Markus Gutschke [this message]
2006-03-10 3:22 ` Andrew Morton
2006-03-10 3:36 ` dkegel
2006-03-10 23:40 ` Daniel Jacobowitz
2006-03-10 23:53 ` dkegel
2006-03-10 22:42 ` [PATCH 1/1] x86: Make _syscallX() macros compile in PIC mode on i386 (updated patch) Markus Gutschke
2006-03-10 23:02 ` dkegel
2006-03-11 0:05 ` [PATCH 1/1] x86: Make _syscallX() macros compile in PIC mode on i386 Arnd Bergmann
2006-03-10 14:37 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4410EC8A.4020808@google.com \
--to=markus@google.com \
--cc=akpm@osdl.org \
--cc=dkegel@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox