lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 16 Feb 2023 14:33:03 +0100
From:   Oleg Nesterov <oleg@...hat.com>
To:     Gregory Price <gregory.price@...verge.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Gregory Price <gourry.memverge@...il.com>,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        avagin@...il.com, peterz@...radead.org, luto@...nel.org,
        krisman@...labora.com, corbet@....net, shuah@...nel.org
Subject: Re: [PATCH v9 1/1] ptrace,syscall_user_dispatch: checkpoint/restore
 support for SUD

On 02/13, Gregory Price wrote:
>
> On Mon, Feb 13, 2023 at 09:26:21PM +0100, Thomas Gleixner wrote:
> > On Fri, Feb 10 2023 at 02:25, Gregory Price wrote:
> > > +struct ptrace_sud_config {
> > > +	__u64 mode;
> > > +	__s8 *selector;
> >
> > How is this correct for a 32bit ptracer running on a 64bit kernel? Aside
> > of not wiring up the compat syscall without any argumentation in the
> > changelog.
> >
>
> I'm having a little trouble wrapping my head around what is "right" here
> with regard to compat.  Granted I've never had to deal with compat
> issues, so please excuse the ignorance if this is a trivial issue.

The problem is the sizeof(selector). 4 bytes for 32bit ptracer but the
kernel will write 8 bytes. I think you should make "selector" __u64 too.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ