From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
Ingo Molnar <mingo@kernel.org>,
Jan Kratochvil <jan.kratochvil@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Pedro Alves <palves@redhat.com>, Peter Anvin <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [PATCH v2 0/4] x86: fix get_nr_restart_syscall()
Date: Tue, 3 Dec 2019 15:12:39 +0100 [thread overview]
Message-ID: <20191203141239.GA30688@redhat.com> (raw)
In-Reply-To: <20191126110659.GA14042@redhat.com>
This version follows the latest recommendation from Linus,
arch_set_restart_data() just saves ti->status in restart->arch_data.
Andy, I can add another patch or change 4/4 to save the syscall number
instead, I am fine either way.
However, personally I dislike restart->arch_data, imo 3/4 is all we need.
I agree, set_restart_fn() is better than the ugly ERESTART_RESTARTBLOCK
check in syscall_return_slowpath() added by v1. But to me the x86-only
arch_data field in restart_block is much worse than the sticky TS_ flag.
To remind, there is another reason for the "transient" 3/4, 4/4 is not
easily backportable.
Oleg.
---
arch/x86/include/asm/processor.h | 9 ---------
arch/x86/include/asm/thread_info.h | 15 ++++++++++++++-
arch/x86/kernel/signal.c | 24 +-----------------------
fs/select.c | 10 ++++------
include/linux/restart_block.h | 1 +
include/linux/thread_info.h | 12 ++++++++++++
kernel/futex.c | 3 +--
kernel/time/alarmtimer.c | 2 +-
kernel/time/hrtimer.c | 2 +-
kernel/time/posix-cpu-timers.c | 2 +-
10 files changed, 36 insertions(+), 44 deletions(-)
next prev parent reply other threads:[~2019-12-03 14:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 11:06 [PATCH] ptrace/x86: introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() Oleg Nesterov
2019-11-26 11:07 ` Oleg Nesterov
2019-11-27 4:04 ` Linus Torvalds
2019-11-27 5:46 ` Andy Lutomirski
2019-11-27 17:06 ` Oleg Nesterov
2019-11-27 17:02 ` Oleg Nesterov
2019-11-27 17:21 ` Linus Torvalds
2019-11-28 15:36 ` Oleg Nesterov
2019-11-28 19:24 ` Linus Torvalds
2019-11-28 21:13 ` Andy Lutomirski
2019-11-29 17:32 ` Oleg Nesterov
2019-11-29 18:19 ` Andy Lutomirski
2019-11-29 17:21 ` Oleg Nesterov
2019-12-03 14:12 ` Oleg Nesterov [this message]
2019-12-03 14:13 ` [PATCH v2 1/4] introduce set_restart_fn() and arch_set_restart_data() Oleg Nesterov
2019-12-04 15:09 ` Oleg Nesterov
2019-12-04 15:09 ` [PATCH v3 " Oleg Nesterov
2019-12-03 14:13 ` [PATCH v2 2/4] x86: mv TS_COMPAT from asm/processor.h to asm/thread_info.h Oleg Nesterov
2019-12-03 14:13 ` [PATCH v2 3/4] x86: introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() Oleg Nesterov
2019-12-03 14:14 ` [PATCH v2 4/4] x86: introduce restart_block->arch_data to kill TS_COMPAT_RESTART Oleg Nesterov
2019-12-18 15:19 ` [PATCH v2 0/4] x86: fix get_nr_restart_syscall() Oleg Nesterov
2019-12-18 20:02 ` Linus Torvalds
2019-12-19 2:48 ` Andy Lutomirski
2020-02-17 15:54 ` Thomas Gleixner
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=20191203141239.GA30688@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jan.kratochvil@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=palves@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).