This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: Fix syscalls during early process initialization [BZ #22685]



On 11/01/2018 19:36, Aurelien Jarno wrote:
> On 2018-01-11 17:27, Tulio Magno Quites Machado Filho wrote:
>> The tunables framework needs to make syscall early during process
>> initialization, before the TCB is available for consumption.  This
>> behavior conflicts with powerpc{|64|64le}'s lock elision code, that
>> tries to abort transactions before a syscall when lock elision is
>> available and enabled.
>>
>> This patch adds the macro EARLY_INTERNAL_SYSCALL in order to let early
>> syscalls happen without depending on the TCB initialization for
>> powerpc{|64|64le}.  Other architectures are redirected to INTERNAL_SYSCALL.
>>
>> Tested on powerpc{|64|64le}, s390x and x86_64.

I am not really understanding why exactly this is failing because the only
object that currently uses __access_noerrno, dl-tunables.os, is built with
-DMODULE_NAME=rtld and thus ABORT_TRANSACTION should be an empty statement.
 

>>
>> 2018-01-11  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
>>
>> 	[BZ #22685]
>> 	* sysdeps/unix/sysdep.h (__EARLY_INTERNAL_SYSCALL0,
>> 	__EARLY_INTERNAL_SYSCALL1, __EARLY_INTERNAL_SYSCALL2,
>> 	__EARLY_INTERNAL_SYSCALL3, __EARLY_INTERNAL_SYSCALL4,
>> 	__EARLY_INTERNAL_SYSCALL5, __EARLY_INTERNAL_SYSCALL6,
>> 	__EARLY_INTERNAL_SYSCALL7, EARLY_INTERNAL_SYSCALL_CALL): New macros
>> 	(EARLY_INTERNAL_SYSCALL): New macro.  Redirect to
>> 	INTERNAL_SYSCALL by default.
>> 	* sysdeps/unix/sysv/linux/not-errno.h (__access_noerrno):
>> 	Replace INTERNAL_SYSCALL_CALL with EARLY_INTERNAL_SYSCALL_CALL.
>> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
>> 	(EARLY_INTERNAL_SYSCALL_NCS, EARLY_INTERNAL_SYSCALL): New macros.
>> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
>> 	(EARLY_INTERNAL_SYSCALL_NCS, EARLY_INTERNAL_SYSCALL): Likewise.
>>
>> Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
>> ---
>>  sysdeps/unix/sysdep.h                              | 25 +++++++++++++++
>>  sysdeps/unix/sysv/linux/not-errno.h                |  4 +--
>>  sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 36 +++++++++++++++++++++-
>>  sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 34 +++++++++++++++++++-
>>  4 files changed, 95 insertions(+), 4 deletions(-)
> 
> Thanks for the patch, I have just tested it and I confirm it fixes the
> issue.
> 
> Tested-by: Aurelien Jarno <aurelien@aurel32.net>
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]