All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "Michal Suchánek" <msuchanek@suse.de>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Shrikanth Hegde" <sshegde@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	"Huacai Chen" <chenhuacai@kernel.org>,
	loongarch@lists.linux.dev, "Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	linux-riscv@lists.infradead.org,
	"Sven Schnelle" <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org, x86@kernel.org,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Jinjie Ruan" <ruanjinjie@huawei.com>,
	"Magnus Lindholm" <linmag7@gmail.com>,
	"Mukesh Kumar Chaurasiya (IBM)" <mkchauras@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Radu Rendec" <radu@rendec.net>
Subject: [patch 0/4] entry: Rework syscall skip logic
Date: Sun, 12 Jul 2026 23:25:12 +0200	[thread overview]
Message-ID: <20260712134433.549076055@kernel.org> (raw)

This are the reworked leftovers of the larger entry logic rework series,
which can be found here:

  https://lore.kernel.org/lkml/20260707181957.433213175@kernel.org

The undisputed part of the series has been merged into:

  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry

After a fruitless discussion about the most resilent approach, I decided to
give up wasting my time and reworked the series so it caters to the desire
of powerpc and s390 to be special.

That results in almost identical behavior except for the case where
tracing/probe/BPF sets the syscall number to -1 (or any other out of range
value) and also sets the syscall return value to something different than
-ENOSYS.

PowerPC and S390 will overwrite that value with -ENOSYS.

Loongarch, RISC-V and x86 will not overwrite it because those architectures
preset the return value to -ENOSYS and skip out of range syscalls
completely. Loongarch and RISC-V always did the out of range skip. X86
gained that in the already applied rework, which means that the final patch
which splits the skip decision from the syscall number does not longer
change x86 behavior for the above case.

Documentation is also updated and describes the two implementation variants
and the subtle difference in the resulting behavior.

The series applies on top of:

  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry

and is also available from git:

  git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry/rework

Thanks,

	tglx
---
 Documentation/core-api/entry.rst |   45 +++++++++++++++++++++++-------
 arch/loongarch/kernel/syscall.c  |   14 ++++-----
 arch/powerpc/kernel/syscall.c    |    3 +-
 arch/riscv/kernel/traps.c        |   11 +++----
 arch/s390/kernel/syscall.c       |    7 +++-
 arch/x86/entry/syscall_32.c      |   25 ++++++++--------
 arch/x86/entry/syscall_64.c      |   12 ++++----
 include/linux/entry-common.h     |   58 +++++++++++++++++----------------------
 kernel/entry/syscall-common.c    |   19 ++++++++----
 9 files changed, 110 insertions(+), 84 deletions(-)


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "Michal Suchánek" <msuchanek@suse.de>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Shrikanth Hegde" <sshegde@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	"Huacai Chen" <chenhuacai@kernel.org>,
	loongarch@lists.linux.dev, "Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	linux-riscv@lists.infradead.org,
	"Sven Schnelle" <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org, x86@kernel.org,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Jinjie Ruan" <ruanjinjie@huawei.com>,
	"Magnus Lindholm" <linmag7@gmail.com>,
	"Mukesh Kumar Chaurasiya (IBM)" <mkchauras@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Radu Rendec" <radu@rendec.net>
Subject: [patch 0/4] entry: Rework syscall skip logic
Date: Sun, 12 Jul 2026 23:25:12 +0200	[thread overview]
Message-ID: <20260712134433.549076055@kernel.org> (raw)

This are the reworked leftovers of the larger entry logic rework series,
which can be found here:

  https://lore.kernel.org/lkml/20260707181957.433213175@kernel.org

The undisputed part of the series has been merged into:

  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry

After a fruitless discussion about the most resilent approach, I decided to
give up wasting my time and reworked the series so it caters to the desire
of powerpc and s390 to be special.

That results in almost identical behavior except for the case where
tracing/probe/BPF sets the syscall number to -1 (or any other out of range
value) and also sets the syscall return value to something different than
-ENOSYS.

PowerPC and S390 will overwrite that value with -ENOSYS.

Loongarch, RISC-V and x86 will not overwrite it because those architectures
preset the return value to -ENOSYS and skip out of range syscalls
completely. Loongarch and RISC-V always did the out of range skip. X86
gained that in the already applied rework, which means that the final patch
which splits the skip decision from the syscall number does not longer
change x86 behavior for the above case.

Documentation is also updated and describes the two implementation variants
and the subtle difference in the resulting behavior.

The series applies on top of:

  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry

and is also available from git:

  git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry/rework

Thanks,

	tglx
---
 Documentation/core-api/entry.rst |   45 +++++++++++++++++++++++-------
 arch/loongarch/kernel/syscall.c  |   14 ++++-----
 arch/powerpc/kernel/syscall.c    |    3 +-
 arch/riscv/kernel/traps.c        |   11 +++----
 arch/s390/kernel/syscall.c       |    7 +++-
 arch/x86/entry/syscall_32.c      |   25 ++++++++--------
 arch/x86/entry/syscall_64.c      |   12 ++++----
 include/linux/entry-common.h     |   58 +++++++++++++++++----------------------
 kernel/entry/syscall-common.c    |   19 ++++++++----
 9 files changed, 110 insertions(+), 84 deletions(-)


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2026-07-12 21:25 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 21:25 Thomas Gleixner [this message]
2026-07-12 21:25 ` [patch 0/4] entry: Rework syscall skip logic Thomas Gleixner
2026-07-12 21:25 ` [patch 1/4] entry: Rework syscall_audit_enter() Thomas Gleixner
2026-07-12 21:25   ` Thomas Gleixner
2026-07-13  1:33   ` Jinjie Ruan
2026-07-13  1:33     ` Jinjie Ruan
2026-07-14 15:01   ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-14 15:23   ` [patch 1/4] " Radu Rendec
2026-07-14 15:23     ` Radu Rendec
2026-07-12 21:25 ` [patch 2/4] entry: Rework trace_syscall_enter() Thomas Gleixner
2026-07-12 21:25   ` Thomas Gleixner
2026-07-13  1:36   ` Jinjie Ruan
2026-07-13  1:36     ` Jinjie Ruan
2026-07-14 15:01   ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-14 15:28   ` [patch 2/4] " Radu Rendec
2026-07-14 15:28     ` Radu Rendec
2026-07-12 21:25 ` [patch 3/4] entry: Make return type of syscall_trace_enter() bool Thomas Gleixner
2026-07-12 21:25   ` Thomas Gleixner
2026-07-13  1:40   ` Jinjie Ruan
2026-07-13  1:40     ` Jinjie Ruan
2026-07-14 15:01   ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-14 15:41   ` [patch 3/4] " Radu Rendec
2026-07-14 15:41     ` Radu Rendec
2026-07-12 21:25 ` [patch 4/4] entry, treewide: Make syscall_enter_from_user_mode[_work]() indicate syscall execution Thomas Gleixner
2026-07-12 21:25   ` Thomas Gleixner
2026-07-13  8:44   ` Michal Suchánek
2026-07-13 17:00     ` Michal Suchánek
2026-07-13 17:00       ` Michal Suchánek
2026-07-13 22:20     ` Thomas Gleixner
2026-07-13 22:20       ` Thomas Gleixner
2026-07-14  7:29       ` Michal Suchánek
2026-07-14  7:29         ` Michal Suchánek
2026-07-14  8:40         ` Michal Suchánek
2026-07-14 15:01   ` [tip: core/entry] " tip-bot2 for Thomas Gleixner
2026-07-14 12:27 ` [patch 0/4] entry: Rework syscall skip logic Michal Suchánek
2026-07-14 12:27   ` Michal Suchánek

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=20260712134433.549076055@kernel.org \
    --to=tglx@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linmag7@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=mkchauras@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=radu@rendec.net \
    --cc=ruanjinjie@huawei.com \
    --cc=sshegde@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.