From: "Dmitry V. Levin" <ldv@strace.io>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>,
Mike Frysinger <vapier@gentoo.org>,
Renzo Davoli <renzo@cs.unibo.it>,
Davide Berardi <berardi.dav@gmail.com>,
strace-devel@lists.strace.io, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] ptrace_get_syscall_info: factor out ptrace_get_syscall_info_op
Date: Thu, 9 Jan 2025 13:14:34 +0200 [thread overview]
Message-ID: <20250109111434.GB15384@strace.io> (raw)
In-Reply-To: <20250109104147.GB26424@redhat.com>
On Thu, Jan 09, 2025 at 11:41:47AM +0100, Oleg Nesterov wrote:
> On 01/08, Dmitry V. Levin wrote:
> >
> > +ptrace_get_syscall_info_op(struct task_struct *child)
> > {
> ...
> > case SIGTRAP | 0x80:
> > switch (child->ptrace_message) {
> > case PTRACE_EVENTMSG_SYSCALL_ENTRY:
> > - actual_size = ptrace_get_syscall_info_entry(child, regs,
> > - &info);
> > - break;
> > + return PTRACE_SYSCALL_INFO_ENTRY;
> > case PTRACE_EVENTMSG_SYSCALL_EXIT:
> > - actual_size = ptrace_get_syscall_info_exit(child, regs,
> > - &info);
> > - break;
> > + return PTRACE_SYSCALL_INFO_EXIT;
> > }
> > break;
> > case SIGTRAP | (PTRACE_EVENT_SECCOMP << 8):
> > - actual_size = ptrace_get_syscall_info_seccomp(child, regs,
> > - &info);
> > + return PTRACE_SYSCALL_INFO_SECCOMP;
> > + }
> > +
> > + return PTRACE_SYSCALL_INFO_NONE;
>
> Cosmetic, I won't insist, but I'd suggest to do
>
> default:
> return PTRACE_SYSCALL_INFO_SECCOMP;
> }
>
> to make it more symmetric.
OK, but I suppose you mean PTRACE_SYSCALL_INFO_NONE here, though.
--
ldv
next prev parent reply other threads:[~2025-01-09 11:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 23:01 [PATCH 0/6] ptrace: introduce PTRACE_SET_SYSCALL_INFO API Dmitry V. Levin
2025-01-07 23:04 ` [PATCH 1/6] Revert "arch: remove unused function syscall_set_arguments()" Dmitry V. Levin
2025-01-07 23:04 ` [PATCH 2/6] syscall.h: add syscall_set_arguments() on remaining HAVE_ARCH_TRACEHOOK arches Dmitry V. Levin
2025-01-09 12:04 ` Oleg Nesterov
2025-01-09 12:11 ` Dmitry V. Levin
2025-01-07 23:04 ` [PATCH 3/6] syscall.h: introduce syscall_set_nr() Dmitry V. Levin
2025-01-10 7:37 ` Sven Schnelle
2025-01-11 1:16 ` Dmitry V. Levin
2025-01-07 23:04 ` [PATCH 4/6] ptrace_get_syscall_info: factor out ptrace_get_syscall_info_op Dmitry V. Levin
2025-01-09 10:09 ` Oleg Nesterov
2025-01-09 10:27 ` Dmitry V. Levin
2025-01-09 10:41 ` Oleg Nesterov
2025-01-09 11:14 ` Dmitry V. Levin [this message]
2025-01-07 23:04 ` [PATCH 5/6] ptrace: introduce PTRACE_SET_SYSCALL_INFO request Dmitry V. Levin
2025-01-09 1:37 ` kernel test robot
2025-01-09 2:21 ` kernel test robot
2025-01-09 14:03 ` kernel test robot
2025-01-09 15:17 ` Eugene Syromiatnikov
2025-01-09 15:21 ` Oleg Nesterov
2025-01-11 11:49 ` Dmitry V. Levin
2025-01-07 23:05 ` [PATCH 6/6] selftests/ptrace: add a test case for PTRACE_SET_SYSCALL_INFO Dmitry V. Levin
2025-01-10 3:15 ` [PATCH 0/6] ptrace: introduce PTRACE_SET_SYSCALL_INFO API H. Peter Anvin
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=20250109111434.GB15384@strace.io \
--to=ldv@strace.io \
--cc=berardi.dav@gmail.com \
--cc=evgsyr@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=renzo@cs.unibo.it \
--cc=strace-devel@lists.strace.io \
--cc=vapier@gentoo.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