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-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D07B81F66E for ; Mon, 17 Aug 2020 14:24:37 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E32D385141E; Mon, 17 Aug 2020 14:24:37 +0000 (GMT) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id 2F60D3860C33 for ; Mon, 17 Aug 2020 14:24:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2F60D3860C33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4BVbsF1Lznz1qt40; Mon, 17 Aug 2020 16:24:33 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4BVbsF0Pwcz1qr4k; Mon, 17 Aug 2020 16:24:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 1pNIZbiTIj67; Mon, 17 Aug 2020 16:24:30 +0200 (CEST) X-Auth-Info: RdXXyb74/1F8YFJXIAtddBM/qFHL3ILNJ8v1Rg7LVtA= Received: from jawa (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 17 Aug 2020 16:24:30 +0200 (CEST) Date: Mon, 17 Aug 2020 16:24:23 +0200 From: Lukasz Majewski To: Adhemerval Zanella Subject: Re: [PATCH] nptl: Handle NULL abstime [BZ #26394] Message-ID: <20200817162423.7687c8a6@jawa> In-Reply-To: <17ab2619-7b27-028d-98c3-87056a4ef160@linaro.org> References: <20200812102205.14816-1-lukma@denx.de> <20200817153019.6d86b10c@jawa> <17ab2619-7b27-028d-98c3-87056a4ef160@linaro.org> Organization: denx.de X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/tPT_btEoEJX11htwX_T_+cS"; protocol="application/pgp-signature" X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer , GNU C Library , Andreas Schwab , Stepan Golosunov , Alistair Francis , Joseph Myers Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" --Sig_/tPT_btEoEJX11htwX_T_+cS Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Adhemerval, H.J. Liu, > On 17/08/2020 10:52, H.J. Lu wrote: > > On Mon, Aug 17, 2020 at 6:30 AM Lukasz Majewski > > wrote: =20 > >> > >> Hi Andreas, H.J., > >> =20 > >>> On Aug 15 2020, H.J. Lu wrote: > >>> =20 > >>>> From fa1f97680fca290a378c449f2b63682ee348fd2c Mon Sep 17 00:00:00 > >>>> 2001 From: "H.J. Lu" > >>>> Date: Sat, 15 Aug 2020 11:06:35 -0700 > >>>> Subject: [PATCH] nptl: Handle NULL abstime [BZ #26394] > >>>> > >>>> Since abstime passed to pthread_{clock|timed}join_np may be > >>>> NULL, =20 > >> > >> Could you point me to the exact reference that it is allowed (or > >> required) to pass NULL to this syscall? > >> > >> The one which I've found on the web: > >> https://linux.die.net/man/3/pthread_timedjoin_np > >> > >> doesn't mention about NULL pointer passed as the absolute time. > >> It says explicitly: > >> "The abstime argument is a structure of the following form, > >> specifying an absolute time measured since the Epoch" > >> > >> > >> As fair as I remember [1] glibc only handles the NULL pointer case > >> when it is explicitly written in the documentation/spec that NULL > >> is passed (like here: https://linux.die.net/man/2/timerfd_settime > >> or here: https://linux.die.net/man/2/utimensat). > >> > >> Link: > >> [1] - > >> https://sourceware.org/pipermail/libc-alpha/2019-November/108072.html > >> =20 > >=20 > > sysdeps/pthread/tst-join14.c explicitly passes NULL: > >=20 > > static int > > do_test_clock (clockid_t clockid) > > { > > pthread_t th =3D xpthread_create (NULL, tf, NULL); > >=20 > > void *status; > > int val =3D (clockid =3D=3D CLOCK_USE_TIMEDJOIN) > > ? pthread_timedjoin_np (th, &status, NULL) > > : pthread_clockjoin_np (th, &status, clockid, NULL); > > TEST_COMPARE (val, 0); > >=20 > > if (status !=3D (void *) 42l) > > FAIL_EXIT1 ("return value %p, expected %p\n", status, (void *) > > 42l); > >=20 > > return 0; > > } > > =20 >=20 > And it is a red-flag that you did not catch it running the testsuite. > Did you check the patch with a full make check to certify there is > no regressions? I must admit that I've run the build-many-glibcs and also my tests (on yocto) on which NULL was not passed. I must have forgotten to run the make check - sorry ..... Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/tPT_btEoEJX11htwX_T_+cS Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAl86kxcACgkQAR8vZIA0 zr0JbQgA5Og2Z0o8wnBu2hJSCfPSs7LfR0cRolQQEGzOVcn43WaP/bTYzJZ2CHwT T5T/6CHaAn3s2jfUN16a9LOuxEYTG3QbunyVfTi2ZfLhaLDduzi8TNHJPcSHQ1em GgNDqqcQXsGLPewID8DqnmvLig75zoqGDm/hbLIsdjCicpGUntJw5EwfrgC9r9HT z+ZcVB01KB0gEGaeXlmeD5hA9kstQfDRsMCuxxfb2KCLTdseFYHyC2TFWC1EtIBt Nh8n131NkCnrpErGMNRO3KqgiLBwLiKjUYahig3XZl/syMdE6Jh+oYHnmaDTSUKH 4a2fEH1t/I3d4Diz/j7xaML0LbVP1w== =JCu2 -----END PGP SIGNATURE----- --Sig_/tPT_btEoEJX11htwX_T_+cS--