public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Gao <wegao@suse.com>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: tglx@linutronix.de, dvhart@infradead.org,
	linux-kernel@vger.kernel.org, dave@stgolabs.net,
	mingo@redhat.com, peterz@infradead.org,
	Arnd Bergmann <arnd@kernel.org>
Subject: Re: [PATCH v1] futex: Add compat_sys_futex_waitv for 32bit compatibility
Date: Mon, 27 Nov 2023 07:15:59 -0500	[thread overview]
Message-ID: <ZWSIfy+QJFyw/zGC@wegao> (raw)
In-Reply-To: <189e733e-7056-45c4-a5c6-3371f8219b7e@igalia.com>

On Thu, Nov 23, 2023 at 01:09:55PM -0300, André Almeida wrote:
> [+CC Arnd]
> 
> Hi Wei,
> 
> Em 23/11/2023 02:31, Wei Gao escreveu:
> > From: wei gao <wegao@suse.com>
> > 
> > Current implementation lead LTP test case futex_waitv failed when compiled with
> > -m32. This patch add new compat_sys_futex_waitv to handle m32 mode syscall.
> > 
> > The failure reason is futex_waitv in m32 mode will deliver kernel with struct
> > old_timespec32 timeout, but this struct type can not directly used by current
> > sys_futex_waitv implementation.
> > 
> > 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.
> > 
> 
> From, what I recall, we don't want to add new syscalls with old_timespec32,
> giving that they will have a limited lifetime. Instead, userspace should be
> able to come up with a 64-bit timespec implementation for -m32.
> 
> Thanks,
> 	André

Just a comment, I have checked the glibc latest code but do not see any implemention(*.c) on
futex_waitv syscall. So normally you have to do syscall directly with __NR_futex_waitv from 
userspace. So i guess glibc-side can not covert this struct correctly currently. Correct me if
any misunderstanding.

Thanks
Wei Gao

  reply	other threads:[~2023-11-27 12:16 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 [this message]
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

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=ZWSIfy+QJFyw/zGC@wegao \
    --to=wegao@suse.com \
    --cc=andrealmeid@igalia.com \
    --cc=arnd@kernel.org \
    --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