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: <ZWmCB5AL0sULlOFs@wegao>
Date:   Fri, 1 Dec 2023 01:49:43 -0500
From:   Wei Gao <wegao@...e.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     mingo@...hat.com, peterz@...radead.org, dvhart@...radead.org,
        dave@...olabs.net, andrealmeid@...lia.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] futex: Add compat_sys_futex_waitv for 32bit
 compatibility

On Wed, Nov 29, 2023 at 09:54:56PM +0100, Thomas Gleixner wrote:
> On Thu, Nov 23 2023 at 00:31, Wei Gao wrote:
> > The new function copy main logic of current sys_futex_waitv, just update parameter
> > type from "struct __kernel_timespec __user *" to "struct old_timespec32 __user *,"
> > and use get_old_timespec32 within the new function to get timeout
> > value.
> 
> That's not how it works.
> 
> struct __kernel_timespec is the same on 64bit and 32bit syscalls.
> 
> User space has to use the proper type when invoking a syscall and and
> not just decide that it can use something arbitrary.
> 
> All new syscalls which deal with time use the Y2038 aware data types and
> do not have compat fallbacks because there is no requirement to have
> them.
> 
> If user space want's to use struct timespec on 32bit nevertheless in the
> programm for a new syscall, which is obviously stupid in the context of
> Y2038, then it's a user space problem to convert back and forth between
> the two data types.
> 
> Fix LTP to be Y2038 safe instead.

Thanks a lot for your suggestion, will check it.

> 
> Thanks,
> 
>         tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ