This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/6] Avoid PLT in i386 syscalls
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 22 Oct 2015 05:32:09 -0700
- Subject: Re: [PATCH 0/6] Avoid PLT in i386 syscalls
- Authentication-results: sourceware.org; auth=none
- References: <20151012231908 dot GA17339 at intel dot com> <mvm6120nrds dot fsf at hawking dot suse dot de> <CAMe9rOrg0GYweJrV34DQ6tnkhV=htt9sjJdKKTNL6+V+qx5H0w at mail dot gmail dot com> <mvmy4evksum dot fsf at hawking dot suse dot de>
On Thu, Oct 22, 2015 at 5:09 AM, Andreas Schwab <schwab@suse.de> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> On Wed, Oct 21, 2015 at 9:00 AM, Andreas Schwab <schwab@suse.de> wrote:
>>> One of these patches probably broke powerpc.
>>>
>>
>> Which one?
>
> 4/6. You must use INTERNAL_SYSCALL_ERRNO to extract the errno
> value from an INTERNAL_SYSCALL.
>
There are
H.J. Lu (6):
Add INLINE_SYSCALL_ERROR_RETURN
Use INLINE_SYSCALL_ERROR_RETURN
Avoid reading errno in syscall implementations
Use INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN
Optimize i386 syscall inlining
i386: Remove syscall assembly codes with 6 arguments
Use INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUE
This patch uses INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUE
to avoid reading and writing errno directly so that we don't need to
call __x86.get_pc_thunk.reg to load PC into reg in case there is an
error.
* sysdeps/unix/sysv/linux/i386/brk.c (__brk): Use
INLINE_SYSCALL_ERROR_RETURN_VALUE.
* sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat):
Likewise.
* sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Use
INTERNAL_SYSCALLINTERNAL_SYSCALL and
INLINE_SYSCALL_ERROR_RETURN_VALUE.
* sysdeps/unix/sysv/linux/i386/lockf64.c (lockf64): Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_sigaction):
Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise.
How does it impact powerpc? Do you have a commit number?
--
H.J.