From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 56A0F385481F for ; Wed, 17 Mar 2021 19:47:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56A0F385481F Received: by mail-qv1-xf30.google.com with SMTP id h3so1986922qvh.8 for ; Wed, 17 Mar 2021 12:47:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MglQvfI+Z1WChXmVaCTAmxPrO70ncUFrTaAx+t9jMpY=; b=FML31St6xtWG2BHEKlDOp0SmRJ81eDIk8SKI5wwzcoxLWgFw+k+Rcm9kveS9HWHcpI orqc5GgZ27aRi9SQ75CNkv2yaCC3LWqH2eseZ27pZuNXL+7qhvUSK1pPwsK3BKKbCZeR tIZ3uknKeqfzRcWubOVI1HuEVlcfTm9hbj25VSSFf0v1GIln2t6wATHGsIIoibzvnVMe XX2CUMMlzVtJHmDkPZqra0YRPTxlkJdrHCoI4uiFv3TIJead9xZkNB80zUppmtZI/sHP hhN2BwDc8Y4TJ7yozHvSnS25m16M1zc2Hbe968ep1bHaZneo/jcB+GJS/PlPsiP9D91V 40Gw== X-Gm-Message-State: AOAM533m94nRgogwpE6Gxg4ArLhq45eJO4LanV2wFQ4ltBSLYMOCcjw8 hP+h09OE3g9ey3VmvVTZmfjpWx6CX+zjj3zM X-Google-Smtp-Source: ABdhPJyBlocTBi2OEC8VQTtkmTQYJTvjD6Smp50UHkO+t7bCqz+v4BfUfS2ww+S6Nixgfty5v13etg== X-Received: by 2002:a05:6214:20a7:: with SMTP id 7mr818093qvd.24.1616010429704; Wed, 17 Mar 2021 12:47:09 -0700 (PDT) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id b17sm14957046qtp.73.2021.03.17.12.47.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Mar 2021 12:47:09 -0700 (PDT) Subject: Re: [PATCH 15/30] nptl: Remove pread from libpthread To: Florian Weimer , Adhemerval Zanella via Libc-alpha References: <20210316200510.2135405-1-adhemerval.zanella@linaro.org> <20210316200510.2135405-16-adhemerval.zanella@linaro.org> <87o8fhy3r8.fsf@oldenburg.str.redhat.com> <87k0q5y3cx.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: <986f7915-13ad-97d8-230d-797000c6c397@linaro.org> Date: Wed, 17 Mar 2021 16:47:07 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <87k0q5y3cx.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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, 17 Mar 2021 19:47:11 -0000 On 17/03/2021 16:41, Florian Weimer wrote: > * Florian Weimer: > >> * Adhemerval Zanella via Libc-alpha: >> >>> diff --git a/sysdeps/unix/sysv/linux/alpha/pread64.c b/sysdeps/unix/sysv/linux/alpha/pread64.c >>> new file mode 100644 >>> index 0000000000..a40e4447e1 >>> --- /dev/null >>> +++ b/sysdeps/unix/sysv/linux/alpha/pread64.c >>> @@ -0,0 +1,33 @@ >>> +/* Read from to a file descriptor at a given offset. Linux/alpha version. >>> + Copyright (C) 2021 Free Software Foundation, Inc. >>> + This file is part of the GNU C Library. >>> + >>> + The GNU C Library is free software; you can redistribute it and/or >>> + modify it under the terms of the GNU Lesser General Public >>> + License as published by the Free Software Foundation; either >>> + version 2.1 of the License, or (at your option) any later version. >>> + >>> + The GNU C Library is distributed in the hope that it will be useful, >>> + but WITHOUT ANY WARRANTY; without even the implied warranty of >>> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >>> + Lesser General Public License for more details. >>> + >>> + You should have received a copy of the GNU Lesser General Public >>> + License along with the GNU C Library; if not, see >>> + . */ >>> + >>> +#define PREAD64_REQUIRE_PREAD_COMPAT >>> +#include >>> + >>> +/* libpthread compat symbols. */ >>> +# if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2) >>> +strong_alias (__libc_pread64, __compat_pread) >>> +compat_symbol (libc, __compat_pread, pread, GLIBC_2_1); >>> + >>> +strong_alias (__libc_pread64, __default_pread) >>> +versioned_symbol (libc, __default_pread, pread, GLIBC_2_2); >>> + >>> +/* It is a libc_hidden_def (__pread), but with a redirection due the symbol >>> + versioning. */ >>> +__hidden_ver1 (__compat_pread, __GI___pread, __compat_pread); >>> +#endif >> >> I believe this is libc_hidden_ver. It took me a while to find it (see >> the original dance around ___libc_once). >> >> This applies else where in this patch and also the pwrite patch. > > Sorry, two more things: I don't quite see how alpha is an outlier here. > > And ideally, this should receive the same treatment (and similar commit > message) as lseek64 because I think we should switch from GLIBC_2.2 > symbols to GLIBC_2.1 for the default, and make the GLIBC_2.2 symbols > compat versions. > > Both comments apply to the pwrite change as well. Alpha is outlier because it requires to handle a GLIBC_2_1 and GLIBC_2_2 symbol versioning *also* for pread and __pread (not only for LFS pread64 and __pread64 as usual LFS ABIs).