From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by sourceware.org (Postfix) with ESMTPS id 4B5D03858D37 for ; Wed, 30 Sep 2020 11:59:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4B5D03858D37 Received: by mail-qt1-x843.google.com with SMTP id e7so889715qtj.11 for ; Wed, 30 Sep 2020 04:59:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/QKYckIKwfnTDMa86PU+ct4YBziwQwKly0uBYmQr728=; b=MNA+WnvX+T8meJQ0iktqMpA9HTVlfhwyRZ/H99nH6UjOn2UQcfwpQU1mlf4IltZD7/ gkrELuxtcUVhdUoofW7OHnGORCOkYDAZs44EU4QuB8mZ7wG93MQpkBUv6FqVS7xUxqQ0 uP83tzowXxnOeQ3RzbB496EhSsyGVWa74EOu9Sr2G9x5aiAPTePoemozPcKdYgLz5f0/ wDriUvYlsHw5zC8eA35tiQGRk/aOW7PmME0sFKnJ1hmg/Qh60WcT04s8lV7IBFlB7S3V sdp7N1w0RkXdLrGgySnNUXLjveI58H5F5vNaDM3pbI+SFi8X5AF0ro7n7MMGrXFJiYvC ZdoA== X-Gm-Message-State: AOAM530ZtvL8im+ii1K0Imhac0Bb/b1IBYRZiJKSjAlvI4+nuoSm0cXI GInTtOcv+dFtTCHdyl76ibLtNA== X-Google-Smtp-Source: ABdhPJzgRn3LIYUoKjNLu9RpZZ6c6QsDRTRtmWIhNRfEyIHz3+6CQn0LRtsn+E7tsQbT3ABczhBbEQ== X-Received: by 2002:ac8:f11:: with SMTP id e17mr1751382qtk.379.1601467193626; Wed, 30 Sep 2020 04:59:53 -0700 (PDT) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id l8sm1979071qtk.77.2020.09.30.04.59.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Sep 2020 04:59:53 -0700 (PDT) To: Lukasz Majewski , Joseph Myers , Paul Eggert Cc: Alistair Francis , Arnd Bergmann , Alistair Francis , GNU C Library , Florian Weimer , Carlos O'Donell , Stepan Golosunov , Andreas Schwab , Zack Weinberg , Jeff Law References: <20200919130759.31916-1-lukma@denx.de> <20200919130759.31916-3-lukma@denx.de> From: Adhemerval Zanella Autocrypt: addr=adhemerval.zanella@linaro.org; prefer-encrypt=mutual; keydata= mQINBFcVGkoBEADiQU2x/cBBmAVf5C2d1xgz6zCnlCefbqaflUBw4hB/bEME40QsrVzWZ5Nq 8kxkEczZzAOKkkvv4pRVLlLn/zDtFXhlcvQRJ3yFMGqzBjofucOrmdYkOGo0uCaoJKPT186L NWp53SACXguFJpnw4ODI64ziInzXQs/rUJqrFoVIlrPDmNv/LUv1OVPKz20ETjgfpg8MNwG6 iMizMefCl+RbtXbIEZ3TE/IaDT/jcOirjv96lBKrc/pAL0h/O71Kwbbp43fimW80GhjiaN2y WGByepnkAVP7FyNarhdDpJhoDmUk9yfwNuIuESaCQtfd3vgKKuo6grcKZ8bHy7IXX1XJj2X/ BgRVhVgMHAnDPFIkXtP+SiarkUaLjGzCz7XkUn4XAGDskBNfbizFqYUQCaL2FdbW3DeZqNIa nSzKAZK7Dm9+0VVSRZXP89w71Y7JUV56xL/PlOE+YKKFdEw+gQjQi0e+DZILAtFjJLoCrkEX w4LluMhYX/X8XP6/C3xW0yOZhvHYyn72sV4yJ1uyc/qz3OY32CRy+bwPzAMAkhdwcORA3JPb kPTlimhQqVgvca8m+MQ/JFZ6D+K7QPyvEv7bQ7M+IzFmTkOCwCJ3xqOD6GjX3aphk8Sr0dq3 4Awlf5xFDAG8dn8Uuutb7naGBd/fEv6t8dfkNyzj6yvc4jpVxwARAQABtElBZGhlbWVydmFs I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DFd/xmGUFCQiQAncSilYOcxNU EMVCXPAQTteqkvA+gNqSaK1NM9tY0eQ4iJpo+aoX8HAcn4sZzt2pfUB9vQMTBJ2d4+m/qO6+ cFTAceXmIoFsN8+gFN3i8Is3u12u8xGudcBPvpoy4OoG Subject: Re: [PATCH v2 3/3] y2038: nptl: Convert pthread_rwlock_{clock|timed}{rd|wr}lock to support 64 bit time Message-ID: <55d2e158-d3df-2c3e-757c-5673d436d4a2@linaro.org> Date: Wed, 30 Sep 2020 08:59:48 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200919130759.31916-3-lukma@denx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 30 Sep 2020 11:59:56 -0000 On 19/09/2020 10:07, Lukasz Majewski wrote: > The pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock, > pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock have been converted > to support 64 bit time. > > This change uses new futex_abstimed_wait64 function in > ./sysdeps/nptl/futex-helpers.c, which uses futex_time64 where possible. > > The pthread_rwlock_{clock|timed}{rd|wr}lock only accepts absolute time. > Moreover, there is no need to check for NULL passed as *abstime pointer to the > syscalls as those calls have exported symbols marked with __nonull attribute > for abstime. > > For systems with __TIMESIZE != 64 && __WORDSIZE == 32: > - Conversions between 64 bit time to 32 bit are necessary > - Redirection to pthread_rwlock_{clock|timed}{rd|wr}lock will provide support > for 64 bit time > > Build tests: > ./src/scripts/build-many-glibcs.py glibcs > > Run-time tests: > - Run specific tests on ARM/x86 32bit systems (qemu): > https://github.com/lmajewski/meta-y2038 and run tests: > https://github.com/lmajewski/y2038-tests/commits/master > > Above tests were performed with Y2038 redirection applied as well as without > to test the proper usage of both __pthread_rwlock_{clock|timed}{rd|wr}lock64 > and __pthread_rwlock_{clock|timed}{rd|wr}lock. > > Reviewed-by: Alistair Francis Looks good, there is only a issue regarding LIBC_PROBE (below). > > --- > Changes for v2: > - None > --- > nptl/pthreadP.h | 18 +++++++++++++++++ > nptl/pthread_rwlock_clockrdlock.c | 19 +++++++++++++++--- > nptl/pthread_rwlock_clockwrlock.c | 19 +++++++++++++++--- > nptl/pthread_rwlock_common.c | 33 +++++++++++++++---------------- > nptl/pthread_rwlock_rdlock.c | 2 +- > nptl/pthread_rwlock_timedrdlock.c | 19 +++++++++++++++--- > nptl/pthread_rwlock_timedwrlock.c | 19 +++++++++++++++--- > nptl/pthread_rwlock_wrlock.c | 2 +- > 8 files changed, 100 insertions(+), 31 deletions(-) > > diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h > index 9bb44c8535..5bcc8a2db5 100644 > --- a/nptl/pthreadP.h > +++ b/nptl/pthreadP.h > @@ -464,6 +464,10 @@ extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex); > # define __pthread_timedjoin_np64 __pthread_timedjoin_np > # define __pthread_cond_timedwait64 __pthread_cond_timedwait > # define __pthread_cond_clockwait64 __pthread_cond_clockwait > +# define __pthread_rwlock_clockrdlock64 __pthread_rwlock_clockrdlock > +# define __pthread_rwlock_clockwrlock64 __pthread_rwlock_clockwrlock > +# define __pthread_rwlock_timedrdlock64 __pthread_rwlock_timedrdlock > +# define __pthread_rwlock_timedwrlock64 __pthread_rwlock_timedwrlock > #else > extern int __pthread_clockjoin_np64 (pthread_t threadid, void **thread_return, > clockid_t clockid, > @@ -481,6 +485,20 @@ extern int __pthread_cond_clockwait64 (pthread_cond_t *cond, > clockid_t clockid, > const struct __timespec64 *abstime); > libpthread_hidden_proto (__pthread_cond_clockwait64) > +extern int __pthread_rwlock_clockrdlock64 (pthread_rwlock_t *rwlock, > + clockid_t clockid, > + const struct __timespec64 *abstime); > +libpthread_hidden_proto (__pthread_rwlock_clockrdlock64) > +extern int __pthread_rwlock_clockwrlock64 (pthread_rwlock_t *rwlock, > + clockid_t clockid, > + const struct __timespec64 *abstime); > +libpthread_hidden_proto (__pthread_rwlock_clockwrlock64) > +extern int __pthread_rwlock_timedrdlock64 (pthread_rwlock_t *rwlock, > + const struct __timespec64 *abstime); > +libpthread_hidden_proto (__pthread_rwlock_timedrdlock64) > +extern int __pthread_rwlock_timedwrlock64 (pthread_rwlock_t *rwlock, > + const struct __timespec64 *abstime); > +libpthread_hidden_proto (__pthread_rwlock_timedwrlock64) > #endif > > extern int __pthread_cond_timedwait (pthread_cond_t *cond, Ok. > diff --git a/nptl/pthread_rwlock_clockrdlock.c b/nptl/pthread_rwlock_clockrdlock.c > index 4cedfd1dcd..d93b133c9e 100644 > --- a/nptl/pthread_rwlock_clockrdlock.c > +++ b/nptl/pthread_rwlock_clockrdlock.c > @@ -21,8 +21,21 @@ > > /* See pthread_rwlock_common.c. */ > int > -pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clockid, > - const struct timespec *abstime) > +__pthread_rwlock_clockrdlock64 (pthread_rwlock_t *rwlock, clockid_t clockid, > + const struct __timespec64 *abstime) > { > - return __pthread_rwlock_rdlock_full (rwlock, clockid, abstime); > + return __pthread_rwlock_rdlock_full64 (rwlock, clockid, abstime); > } > + > +#if __TIMESIZE != 64 > +libpthread_hidden_def (__pthread_rwlock_clockrdlock64) Maybe an extra space here? > +int > +__pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clockid, > + const struct timespec *abstime) > +{ > + struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); > + > + return __pthread_rwlock_clockrdlock64 (rwlock, clockid, &ts64); > +} > +#endif > +weak_alias (__pthread_rwlock_clockrdlock, pthread_rwlock_clockrdlock) Ok. > diff --git a/nptl/pthread_rwlock_clockwrlock.c b/nptl/pthread_rwlock_clockwrlock.c > index 7a954cf529..10a314c76d 100644 > --- a/nptl/pthread_rwlock_clockwrlock.c > +++ b/nptl/pthread_rwlock_clockwrlock.c > @@ -21,8 +21,21 @@ > > /* See pthread_rwlock_common.c. */ > int > -pthread_rwlock_clockwrlock (pthread_rwlock_t *rwlock, clockid_t clockid, > - const struct timespec *abstime) > +__pthread_rwlock_clockwrlock64 (pthread_rwlock_t *rwlock, clockid_t clockid, > + const struct __timespec64 *abstime) > { > - return __pthread_rwlock_wrlock_full (rwlock, clockid, abstime); > + return __pthread_rwlock_wrlock_full64 (rwlock, clockid, abstime); > } > + Ok. > +#if __TIMESIZE != 64 > +libpthread_hidden_def (__pthread_rwlock_clockwrlock64) Maybe an extra space here? > +int > +__pthread_rwlock_clockwrlock (pthread_rwlock_t *rwlock, clockid_t clockid, > + const struct timespec *abstime) > +{ > + struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); > + > + return __pthread_rwlock_clockwrlock64 (rwlock, clockid, &ts64); > +} > +#endif > +weak_alias (__pthread_rwlock_clockwrlock, pthread_rwlock_clockwrlock) Ok. > diff --git a/nptl/pthread_rwlock_common.c b/nptl/pthread_rwlock_common.c > index 3fbc66ded2..4c9f582d3d 100644 > --- a/nptl/pthread_rwlock_common.c > +++ b/nptl/pthread_rwlock_common.c > @@ -278,9 +278,8 @@ __pthread_rwlock_rdunlock (pthread_rwlock_t *rwlock) > > > static __always_inline int > -__pthread_rwlock_rdlock_full (pthread_rwlock_t *rwlock, > - clockid_t clockid, > - const struct timespec *abstime) > +__pthread_rwlock_rdlock_full64 (pthread_rwlock_t *rwlock, clockid_t clockid, > + const struct __timespec64 *abstime) > { > unsigned int r; > Ok. > @@ -330,8 +329,9 @@ __pthread_rwlock_rdlock_full (pthread_rwlock_t *rwlock, > & PTHREAD_RWLOCK_RWAITING) != 0) > { > int private = __pthread_rwlock_get_private (rwlock); > - int err = futex_abstimed_wait (&rwlock->__data.__readers, > - r, clockid, abstime, private); > + int err = __futex_abstimed_wait64 (&rwlock->__data.__readers, > + r, clockid, abstime, > + private); > /* We ignore EAGAIN and EINTR. On time-outs, we can just > return because we don't need to clean up anything. */ > if (err == ETIMEDOUT) Ok. > @@ -457,9 +457,9 @@ __pthread_rwlock_rdlock_full (pthread_rwlock_t *rwlock, > (&rwlock->__data.__wrphase_futex, > &wpf, wpf | PTHREAD_RWLOCK_FUTEX_USED))) > continue; > - int err = futex_abstimed_wait (&rwlock->__data.__wrphase_futex, > - 1 | PTHREAD_RWLOCK_FUTEX_USED, > - clockid, abstime, private); > + int err = __futex_abstimed_wait64 (&rwlock->__data.__wrphase_futex, > + 1 | PTHREAD_RWLOCK_FUTEX_USED, > + clockid, abstime, private); > if (err == ETIMEDOUT) > { > /* If we timed out, we need to unregister. If no read phase Ok. > @@ -585,9 +585,8 @@ __pthread_rwlock_wrunlock (pthread_rwlock_t *rwlock) > > > static __always_inline int > -__pthread_rwlock_wrlock_full (pthread_rwlock_t *rwlock, > - clockid_t clockid, > - const struct timespec *abstime) > +__pthread_rwlock_wrlock_full64 (pthread_rwlock_t *rwlock, clockid_t clockid, > + const struct __timespec64 *abstime) > { > /* Make sure any passed in clockid and timeout value are valid. Note that > the previous implementation assumed that this check *must* not be > @@ -728,9 +727,9 @@ __pthread_rwlock_wrlock_full (pthread_rwlock_t *rwlock, > share the flag, and another writer will wake one of the writers > in this group. */ > may_share_futex_used_flag = true; > - int err = futex_abstimed_wait (&rwlock->__data.__writers_futex, > - 1 | PTHREAD_RWLOCK_FUTEX_USED, > - clockid, abstime, private); > + int err = __futex_abstimed_wait64 (&rwlock->__data.__writers_futex, > + 1 | PTHREAD_RWLOCK_FUTEX_USED, > + clockid, abstime, private); > if (err == ETIMEDOUT) > { > if (prefer_writer) Ok. > @@ -827,9 +826,9 @@ __pthread_rwlock_wrlock_full (pthread_rwlock_t *rwlock, > (&rwlock->__data.__wrphase_futex, &wpf, > PTHREAD_RWLOCK_FUTEX_USED))) > continue; > - int err = futex_abstimed_wait (&rwlock->__data.__wrphase_futex, > - PTHREAD_RWLOCK_FUTEX_USED, > - clockid, abstime, private); > + int err = __futex_abstimed_wait64 (&rwlock->__data.__wrphase_futex, > + PTHREAD_RWLOCK_FUTEX_USED, > + clockid, abstime, private); > if (err == ETIMEDOUT) > { > if (rwlock->__data.__flags != PTHREAD_RWLOCK_PREFER_READER_NP) Ok. > diff --git a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c > index 04cecad395..2b8509a49c 100644 > --- a/nptl/pthread_rwlock_rdlock.c > +++ b/nptl/pthread_rwlock_rdlock.c > @@ -24,7 +24,7 @@ __pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) > { > LIBC_PROBE (rdlock_entry, 1, rwlock); We need to move the systemtap probe to the 64-bit variant, so the 64-bit time will still trigger it. > > - int result = __pthread_rwlock_rdlock_full (rwlock, CLOCK_REALTIME, NULL); > + int result = __pthread_rwlock_rdlock_full64 (rwlock, CLOCK_REALTIME, NULL); > LIBC_PROBE (rdlock_acquire_read, 1, rwlock); > return result; > } Ok. > diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c > index c5d8aee909..d5999a1419 100644 > --- a/nptl/pthread_rwlock_timedrdlock.c > +++ b/nptl/pthread_rwlock_timedrdlock.c > @@ -20,8 +20,21 @@ > > /* See pthread_rwlock_common.c. */ > int > -pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock, > - const struct timespec *abstime) > +__pthread_rwlock_timedrdlock64 (pthread_rwlock_t *rwlock, > + const struct __timespec64 *abstime) > { > - return __pthread_rwlock_rdlock_full (rwlock, CLOCK_REALTIME, abstime); > + return __pthread_rwlock_rdlock_full64 (rwlock, CLOCK_REALTIME, abstime); > } > + Ok. > +#if __TIMESIZE != 64 > +libpthread_hidden_def (__pthread_rwlock_timedrdlock64) Maybe an extra space here? > +int > +__pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock, > + const struct timespec *abstime) > +{ > + struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); > + > + return __pthread_rwlock_timedrdlock64 (rwlock, &ts64); > +} > +#endif > +weak_alias (__pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock) Ok. > diff --git a/nptl/pthread_rwlock_timedwrlock.c b/nptl/pthread_rwlock_timedwrlock.c > index ccee8b77d9..6c5284a172 100644 > --- a/nptl/pthread_rwlock_timedwrlock.c > +++ b/nptl/pthread_rwlock_timedwrlock.c > @@ -20,8 +20,21 @@ > > /* See pthread_rwlock_common.c. */ > int > -pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock, > - const struct timespec *abstime) > +__pthread_rwlock_timedwrlock64 (pthread_rwlock_t *rwlock, > + const struct __timespec64 *abstime) > { > - return __pthread_rwlock_wrlock_full (rwlock, CLOCK_REALTIME, abstime); > + return __pthread_rwlock_wrlock_full64 (rwlock, CLOCK_REALTIME, abstime); > } > + > +#if __TIMESIZE != 64 > +libpthread_hidden_def (__pthread_rwlock_timedwrlock64) Maybe an extra space here? > +int > +__pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock, > + const struct timespec *abstime) > +{ > + struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); > + > + return __pthread_rwlock_timedwrlock64 (rwlock, &ts64); > +} > +#endif > +weak_alias (__pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock) Ok. > diff --git a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c > index a42aa626f0..210e6cffdc 100644 > --- a/nptl/pthread_rwlock_wrlock.c > +++ b/nptl/pthread_rwlock_wrlock.c > @@ -24,7 +24,7 @@ __pthread_rwlock_wrlock (pthread_rwlock_t *rwlock) > { > LIBC_PROBE (wrlock_entry, 1, rwlock); We need to move the systemtap probe to the 64-bit variant, so the 64-bit time will still trigger it. > > - int result = __pthread_rwlock_wrlock_full (rwlock, CLOCK_REALTIME, NULL); > + int result = __pthread_rwlock_wrlock_full64 (rwlock, CLOCK_REALTIME, NULL); > LIBC_PROBE (wrlock_acquire_write, 1, rwlock); > return result; > } > Ok.