Re: [PATCH v2 6/7] ptrace: introduce PTRACE_SET_SYSCALL_INFO request

From
Oleg Nesterov <oleg@redhat.com>
Date
2025-01-15 19:10:41
Also in
lkml
Reply to
Dmitry V. Levin, 2025-01-15
On 01/15, Dmitry V. Levin wrote:
On Wed, Jan 15, 2025 at 05:38:09PM +0100, Oleg Nesterov wrote:
quoted
But may be

	if (syscall_get_nr() != -1)
		syscall_set_arguments(...);

will look a bit more consistent?
I'm sorry, but I didn't follow.  As we've just set the syscall number with
syscall_set_nr(), why would we want to call syscall_get_nr() right after
that to obtain the syscall number?
Mostly for grep. We have more syscall_get_nr() != -1 checks. Even right after
syscall_set_nr-like code, see putreg32().

I think this needs another helper (which can have more users) and some cleanups.

But this is another issue, so please forget. I agree that syscall_get_nr() in
this code will probably just add the unnecessary confusion.

Oleg.
Thread (19 messages) 19 messages, 4 authors, last reply 2025-01-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help