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=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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=ham 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 0A9721F466 for ; Fri, 31 Jan 2020 21:47:50 +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=I3kv FN4iHqslbDk7HlBtCSolO1mCaBMK0qbnVMCxIJSrNV8Gt1kUKTLa9cEWaeIURZjU /JBMKLVUcprjddRrmZWY0JW/dcLd5XRYP795LTPjqFcKtO7CLjVefLGnnbslEuNQ XF+eqiJei7jFwfSxFxLGpOLGcEMjDygwiOnbfmg= 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=EnxP61ti7d OOUMzrhiIFnSnmaM8=; b=hHOsjiTPR6FCs/lCgV5gLu3jEbiRzRpvMtqXhGigOe EIX758qMAliSl3HHqd8R6O9edI+c+p5CXYUHHOSDwiZv0ny49+y+/8U6ZKct3Q2R C4nszg6mBjP57xm87BsLOl+pBhElGifqa0dPcKMFNsiazE4EMCdLjIDq9YNVJ2/D c= Received: (qmail 39802 invoked by alias); 31 Jan 2020 21:47:47 -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 39785 invoked by uid 89); 31 Jan 2020 21:47:47 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mout.kundenserver.de MIME-Version: 1.0 References: <20200131170354.25539-1-alistair.francis@wdc.com> In-Reply-To: <20200131170354.25539-1-alistair.francis@wdc.com> From: Arnd Bergmann Date: Fri, 31 Jan 2020 22:47:26 +0100 Message-ID: Subject: Re: [PATCH] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex To: Alistair Francis Cc: GNU C Library , Alistair Francis Content-Type: text/plain; charset="UTF-8" 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? Arnd