From: Wei Gao <wegao@suse.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: mingo@redhat.com, peterz@infradead.org, dvhart@infradead.org,
dave@stgolabs.net, andrealmeid@igalia.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] futex: Add compat_sys_futex_waitv for 32bit compatibility
Date: Fri, 1 Dec 2023 01:49:43 -0500 [thread overview]
Message-ID: <ZWmCB5AL0sULlOFs@wegao> (raw)
In-Reply-To: <87a5qwz3dr.ffs@tglx>
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
prev parent reply other threads:[~2023-12-01 6:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 5:31 [PATCH v1] futex: Add compat_sys_futex_waitv for 32bit compatibility Wei Gao
2023-11-23 16:09 ` André Almeida
2023-11-27 12:15 ` Wei Gao
2023-11-29 18:56 ` André Almeida
2023-12-01 6:39 ` Wei Gao
2023-11-24 13:19 ` kernel test robot
2023-11-29 20:54 ` Thomas Gleixner
2023-12-01 6:49 ` Wei Gao [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=ZWmCB5AL0sULlOFs@wegao \
--to=wegao@suse.com \
--cc=andrealmeid@igalia.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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