From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1BDD01F466 for ; Fri, 31 Jan 2020 23:53:36 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=U/WZ hnuSvgHlHV9tNpmJzHWbTVS12GZ/U44zMx/ovrmwqvAmN9L9fdyYXIIg4VlVllFa isYslcXKEpLG+cyf0/McIPdUtf8NLtsb5MDeEV4DpSwNMB0NLz74bf4kG9DXl1Wt ZyVHz+RwUdP7diYKaf7Sb9q66XHohafBibu3YJg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=2hqGwp101T zEF4lH0r14vv14bY4=; b=R511vYtZ7AlRehYI8m6MoZSbrIylMyuXJF7qTCZDYI elz6G4RC3NZfK7830t8jSYuuFp6mCMEeJ6BYhYpuzyn4zx4ydJY4Z7Blv7cJGEPr 0mW6lk9+l/qiYcyO1X86DuJO3tupNIqBe/X41vqwhFjYlBSfKrppy0j3StcvTdzJ 8= Received: (qmail 110222 invoked by alias); 31 Jan 2020 23:53:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 110213 invoked by uid 89); 31 Jan 2020 23:53:33 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-lj1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AUgN9DVGtB4vRYGXl1d8ke9+BzdUAC/iJ+xdUz4msgA=; b=OT9QLMaZTiQPcaaIlHOgbJLBmY6kd70fVfd+EG4Vu5I55/37PbbIRUtl8Mx0SZNciJ PFfNxeq8n3zP3qn6KdTMWjK2mw2V0pgYeUh1DmSd6X9quZg9CqcFNCz6Z2Vc6CCDiai1 97c5MH8H01+EeW7dDXreNk+H7kKrx4pfoRFdTS1G0nUpAmdbHDEhONklLwYjMouwRfBf bPNabNwYbA05sbWagitf6pgNCYmEVEb7monbEuS3pFvZychQv/ndWN1oVhpwZODlIOsF /CCHlUpNSYN2Lsv+FZ26NfTqGIf2p5M4Pg6kF3XGM829gfB6YyDxCEvnNA0XHl1CoZzT ozzg== MIME-Version: 1.0 References: <20200131170354.25539-1-alistair.francis@wdc.com> In-Reply-To: From: Alistair Francis Date: Fri, 31 Jan 2020 15:46:27 -0800 Message-ID: Subject: Re: [PATCH] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex To: Arnd Bergmann Cc: Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" On Fri, Jan 31, 2020 at 1:47 PM Arnd Bergmann wrote: > > On Fri, Jan 31, 2020 at 6:10 PM Alistair Francis > wrote: > > > > We can't include sysdep.h in the test case (it introduces lots of > > strange failures) so __NR_futex isn't redifined to __NR_futex_time64 by > > 64-bit time_t 32-bit archs (y2038 safe). > > > > To allow the test to pass let's just do the __NR_futex_time64 syscall if > > we don't have __NR_futex defined. > > --- > > sysdeps/unix/sysv/linux/tst-clone3.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c > > index 400eb89a5b..613cb4a811 100644 > > --- a/sysdeps/unix/sysv/linux/tst-clone3.c > > +++ b/sysdeps/unix/sysv/linux/tst-clone3.c > > @@ -56,7 +56,11 @@ f (void *a) > > static inline int > > futex_wait (int *futexp, int val) > > { > > +#ifdef __NR_futex > > return syscall (__NR_futex, futexp, FUTEX_WAIT, val); > > +#else > > + return syscall (__NR_futex_time64, futexp, FUTEX_WAIT, val); > > +#endif > > } > > There are other references to __NR_futex and INTERNAL_SYSCALL (futex, ...) > that likely suffer from the same problem. Would it make sense to address > those all at once? This is normally handled by something like this: # ifndef __NR_futex # define __NR_futex __NR_futex_time64 # endif in sysdep.h. This test is the only case I have seen where sysdep.h isn't included (and I couldn't easily include it) hence the manual fixup. Alistair > > Arnd