mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Dongjun Kim <aurorasphere@o.cnu.ac.kr>
Cc: "Dmitry V . Levin" <ldv@strace.io>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] microblaze: implement syscall_rollback
Date: Tue, 21 Apr 2026 10:30:39 +0200	[thread overview]
Message-ID: <64c43b95-60d0-4ae6-97ca-b6046d4a99b0@amd.com> (raw)
In-Reply-To: <20260417120310.232161-1-aurorasphere@o.cnu.ac.kr>

Hi,

On 4/17/26 14:03, Dongjun Kim wrote:
> Added the implementation of syscall_rollback() in
> arch/microblaze/include/asm/syscall.h, which was previously a TODO
> stub. This implementation makes seccomp and syscall user dispatch
> rollback paths report the original syscall number consistently.


The patch itself is correct but description should be improved to have more details.

Something like

The syscall entry code in entry.S saves the original syscall number 

(r12) into the pt_regs r0 slot (swi r12, r1, PT_R0), which is
otherwise unused since hardware r0 is hardwired to zero. 

syscall_rollback() restores r12 from this saved copy, undoing any
modification made to the syscall number after entry. 

  

This is needed by the SECCOMP_RET_TRAP and SECCOMP_RET_KILL paths in 

__seccomp_filter(), which call syscall_rollback() before delivering 

SIGSYS so that the signal handler or coredump sees the original 

register state.


Anyway. How did you test this?

Thanks,
Michal

      reply	other threads:[~2026-04-21  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 12:03 Dongjun Kim
2026-04-21  8:30 ` Michal Simek [this message]

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=64c43b95-60d0-4ae6-97ca-b6046d4a99b0@amd.com \
    --to=michal.simek@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=aurorasphere@o.cnu.ac.kr \
    --cc=ldv@strace.io \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®