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

From
Oleg Nesterov <oleg@redhat.com>
Date
2025-01-17 15:33:34
Also in
lkml
Reply to
Dmitry V. Levin, 2025-01-17
Dmitry,

You certainly understand the user-space needs much better than me.
I am just trying to understand your point.

On 01/17, Dmitry V. Levin wrote:
We should accept larger user_size from the very beginning, so that in case
the structure grows in the future, the userspace that sicks to the current
set of supported features would be still able to work with older kernels.
This is what I can't understand, perhaps I have a blind spot here ;)

Could you provide an example (even absolutely artificial) of possible extension
which can help me to understand?
We cannot just use sizeof(info) because it depends on the alignment of
__u64.
Hmm why? I thought that the kernel already depends on the "natural" alignment?
And if we can't, then PTRACE_SYSCALL_INFO_SIZE_VER0 added by this patch makes
no sense?

Sorry I guess I must have missed something, I am sick today.
Also, I don't think we need to fill with zeroes the trailing
padding bytes of the structure as we are not going to use them in any way.
At least we seem to agree here ;)

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