unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Vineet Gupta via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: "linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches
Date: Wed, 11 Mar 2020 18:44:15 +0000	[thread overview]
Message-ID: <28d6ac17-5c47-5b16-ec32-abd629f0cce1@synopsys.com> (raw)
In-Reply-To: <87r1yjhv8l.fsf@oldenburg2.str.redhat.com>

Hi Florian,

On 2/25/20 1:27 AM, Florian Weimer wrote:
> * Vineet Gupta:
> 
>> +/* Override syscalls for asm-generic ABIs with 64-bit time.  */
>> +#if __WORDSIZE == 32 && __TIMESIZE == 64
>> +
>> +# undef __NR_futex
>> +# define __NR_futex __NR_futex_time64
>> +
>> +# undef __NR_rt_sigtimedwait
>> +# define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64
> 
> I'm not totally unsympathetic to this in principle, but I think if we
> start messing more with the system call numbers in this way, we should
> move away from the __NR_ prefixes and use our own constant names.
> 
> Otherwise, the results could be very confusing, especially if there are
> exceptions to this exception and we need the original system call number
> after all.

OK I understand that redef could get messy. How about simple #undef of the 32-bit
syscalls so they are not available in general and rely on generic code to fallback
and DRT.

Do note that this is mostly a "preventive" fix (for single exception see below)
and new arches will hopefully not trip here as they won't have the 32-bit syscalls
to begin with. It is applicable to arches with slightly older version of the
asm-generic ABI. And for same reasons I can even move those into ARC sysdep.h -
what would you recommend.

FWIW the only relevant piece here is futex which generic lll code expects
__NR_futex and we need to undef/redef to 64-bit variant (either here or in ARCH
specific sysdep.h for RV32 and ARC) so having that part atleast in generic code
will help future ports avoid the copy/paste.

Thx,
-Vineet

  reply	other threads:[~2020-03-11 18:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 18:34 [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches Vineet Gupta
2020-02-25  0:59 ` Alistair Francis
2020-02-25  1:16   ` Vineet Gupta
2020-02-25  9:27 ` Florian Weimer
2020-03-11 18:44   ` Vineet Gupta via Libc-alpha [this message]
2020-03-12 18:33   ` [PATCH v2] Force 64-bit time based syscalls for TIMESIZE==64 Vineet Gupta via Libc-alpha
2020-03-31 21:47     ` [PATCH v3] Make any 32-bit time based syscalls unavailable " Vineet Gupta via Libc-alpha
2020-04-06 18:54       ` Vineet Gupta via Libc-alpha
2020-04-13 21:12         ` Vineet Gupta via Libc-alpha
2020-04-18  0:28           ` Vineet Gupta via Libc-alpha
2020-04-18 16:50             ` Florian Weimer

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28d6ac17-5c47-5b16-ec32-abd629f0cce1@synopsys.com \
    --to=libc-alpha@sourceware.org \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=fweimer@redhat.com \
    --cc=linux-snps-arc@lists.infradead.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).