From: Gregory Price <gregory.price@memverge.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Gregory Price <gourry.memverge@gmail.com>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
avagin@gmail.com, peterz@infradead.org, luto@kernel.org,
krisman@collabora.com, tglx@linutronix.de, corbet@lwn.net,
shuah@kernel.org
Subject: Re: [PATCH 2/2] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD
Date: Sat, 18 Feb 2023 05:53:35 -0500 [thread overview]
Message-ID: <Y/CuL9CAf1tfAmhR@memverge.com> (raw)
In-Reply-To: <20230216135737.GC5200@redhat.com>
On Thu, Feb 16, 2023 at 02:57:38PM +0100, Oleg Nesterov wrote:
> On 02/14, Gregory Price wrote:
> >
> > +struct compat_ptrace_sud_config {
> > + compat_ulong_t mode;
> > + compat_uptr_t selector;
> > + compat_ulong_t offset;
> > + compat_ulong_t len;
> > +};
>
> ...
>
> > +int syscall_user_dispatch_get_config(struct task_struct *task, unsigned long size,
> > + void __user *data)
> > +{
> > + struct syscall_user_dispatch *sd = &task->syscall_dispatch;
> > +#ifdef CONFIG_COMPAT
> > + if (unlikely(in_compat_syscall())) {
> > + struct compat_ptrace_sud_config cfg32;
> > +
> > + if (size != sizeof(struct compat_ptrace_sud_config))
> > + return -EINVAL;
> > +
>
> Horror ;) why?
>
> See my reply to v9, just make
>
> struct ptrace_sud_config {
> __u8 mode;
> __u64 selector;
> __u64 offset;
> __u64 len;
> };
>
> Oleg.
>
It was unclear to me what the prior note was asking an I followed the
pattern of other compat code in ptrace. For some reason i got it in my
head that u64 would compile down to u32 in compatibility mode and i went
full-stupid.
will back out this compat code here and fixup the struct.
prev parent reply other threads:[~2023-02-21 16:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 8:52 [PATCH 0/2] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-02-14 8:52 ` [PATCH 1/2] syscall_user_dispatch: helper function to operate on given task Gregory Price
2023-02-14 8:52 ` [PATCH 2/2] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD Gregory Price
2023-02-16 13:57 ` Oleg Nesterov
2023-02-18 10:53 ` Gregory Price [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=Y/CuL9CAf1tfAmhR@memverge.com \
--to=gregory.price@memverge.com \
--cc=avagin@gmail.com \
--cc=corbet@lwn.net \
--cc=gourry.memverge@gmail.com \
--cc=krisman@collabora.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/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