From: Aurelien Jarno <aurelien@aurel32.net>
To: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] powerpc: Fix syscalls during early process initialization [BZ #22685]
Date: Thu, 11 Jan 2018 21:37:00 -0000 [thread overview]
Message-ID: <20180111213656.GA32709@aurel32.net> (raw)
In-Reply-To: <20180111192750.6256-1-tuliom@linux.vnet.ibm.com>
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.
>
> 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>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2018-01-11 21:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 19:41 Tulio Magno Quites Machado Filho
2018-01-11 21:37 ` Aurelien Jarno [this message]
2018-01-11 22:40 ` Adhemerval Zanella
2018-01-11 23:42 ` Florian Weimer
2018-01-12 0:56 ` Adhemerval Zanella
2018-01-12 16:07 ` [PATCHv2] " Tulio Magno Quites Machado Filho
2018-01-12 16:31 ` Florian Weimer
2018-01-12 16:40 ` Tulio Magno Quites Machado Filho
2018-01-12 16:44 ` Florian Weimer
2018-01-12 20:53 ` [PATCHv3] " Tulio Magno Quites Machado Filho
2018-01-16 15:51 ` Aurelien Jarno
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=20180111213656.GA32709@aurel32.net \
--to=aurelien@aurel32.net \
--cc=libc-alpha@sourceware.org \
--cc=tuliom@linux.vnet.ibm.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).