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]
Message-ID: <Y/CuL9CAf1tfAmhR@memverge.com>
Date:   Sat, 18 Feb 2023 05:53:35 -0500
From:   Gregory Price <gregory.price@...verge.com>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     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, tglx@...utronix.de, corbet@....net,
        shuah@...nel.org
Subject: Re: [PATCH 2/2] ptrace,syscall_user_dispatch: checkpoint/restore
 support for SUD

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ