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=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 A0C4A1F4B4 for ; Thu, 22 Oct 2020 12:43:49 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9BE83985400; Thu, 22 Oct 2020 12:43:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9BE83985400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603370628; bh=wJY5P0xm4ivYBXeni2m/1hkmtTTSWGVSdN+koWwV1fg=; h=To:References:Subject:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=w8lTNAz0gN8LfASU6XU8TrqVJqZRK7SiDos9ZRorn7oUptavEKqMomV+NCZxGu2q2 QH6uN1NcenakegxuX87LVE3N85j9XfwF9NJ0FKn+CHi63UpIZQUNUV5sKWLHmXvwS2 fqK3Nsh51foIZK8mXk37RtW+iwwvJiN9p0R3R8nk= Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by sourceware.org (Postfix) with ESMTPS id C717E389700F for ; Thu, 22 Oct 2020 12:43:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C717E389700F Received: by mail-qt1-x841.google.com with SMTP id h19so879333qtq.4 for ; Thu, 22 Oct 2020 05:43:45 -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=wJY5P0xm4ivYBXeni2m/1hkmtTTSWGVSdN+koWwV1fg=; b=E/zSR1x6jonE0DP3NeYASOep97D+/niShIM+uDVpusa3ZJQqVjjUE1Lq1r0+FF/h6H 9CIHFHlxD72NaDAKlZXs0pv/Lv3SkDNF9ozdNFyRKOxq8+68qkt0i1iYnzzorthlLLMg l+cf0DYnD56bnc6FmVb0Rr6m3ZgeXNAfd06Ie9lULN2AWrwhSzH+O63wBqdf9tGYiRxC n2UN2FRwhwOwu9SzBRUFgl/WAjOzkJyUSlRc+NGFNJe/MXIWyLICXV+t1WJNpU26USya V5wXRCnf2ZeMEXzoWeVDweEoxQM5I0f+VulFtRwm9yybfcZxOAonQAdahGRjA3LRQ0DO +uuA== X-Gm-Message-State: AOAM5315M7/NP5Qg1TAYHJ9IRsQfnUwen6CkzzDrDHMcCuTkaHST9ROF 8EZkedM+reTbMbak139LIsvjxQ== X-Google-Smtp-Source: ABdhPJxwOyIGRIZL88mgaos2l7AoqQbTaq49LX1hW8hhCkFqCoz9dcFcSJbyks70/n3r6T8vVcX8hA== X-Received: by 2002:ac8:2f4f:: with SMTP id k15mr1767657qta.178.1603370625277; Thu, 22 Oct 2020 05:43:45 -0700 (PDT) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id g1sm852450qtp.74.2020.10.22.05.43.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Oct 2020 05:43:44 -0700 (PDT) To: Florian Weimer References: <20200723194641.1949404-1-adhemerval.zanella@linaro.org> <20200723194641.1949404-15-adhemerval.zanella@linaro.org> <87blgw2lyk.fsf_-_@oldenburg2.str.redhat.com> <0b5a532d-3d5a-0574-359e-1993720b9bb3@linaro.org> <87tuunvirb.fsf@oldenburg2.str.redhat.com> <88d0f0d4-3062-d30d-676c-1909594601a0@linaro.org> <877drishd5.fsf@oldenburg2.str.redhat.com> 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 IFphbmVsbGEgTmV0dG8gKExpbmFybyBWUE4gS2V5KSA8YWRoZW1lcnZhbC56YW5lbGxhQGxp bmFyby5vcmc+iQI3BBMBCAAhBQJXFRpKAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh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BPvpoy4OoG Subject: Re: __xstat et al. as compat symbols Message-ID: Date: Thu, 22 Oct 2020 09:43:41 -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: <877drishd5.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Cc: Alistair Francis , Adhemerval Zanella via Libc-alpha Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 22/10/2020 07:08, Florian Weimer wrote: > * Adhemerval Zanella: > >>> I think the impact of that is a bit narrower because it requires special >>> compiler flags. But I suspect I will ask for reverting that in a year >>> as well. 8-/ >> >> It is sad that we can't get rid of clunky and not well thought interface, >> which kind of issues are you seeing that is making you thinking about >> reverting the libm finite symbols? > > Based on the failures I've seen so far, Ocaml would have to start > distributing binaries for glibc 2.32 and earlier (probably built on > something like glibc 2.17) and glibc 2.33 and later (built on glibc > 2.33). Other native code compilers are likely affected in the same way. Indeed it seems that Ocaml distributes static libraries with reference xstat symbols. And I agree that this is only one example, I would expect more libraries would use the xstat symbos. > >>>> The issue is only for static linking, by stopping using >>>> libc_nonshared.a we need to provide the versioned stat symbols anyway. >>>> And we still need to handle new ABIs where adding the old xstat >>>> symbols does not make sense (such as riscv32 or any new 32-bit >>>> architecture). >>> >>> You could use a SHLIB_COMPAT conditional without compat_symbol, the two >>> are separate. >> >> The problem is with: >> >> #if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) >> int >> __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) >> { >> } >> #endif >> >> It won't be built for static and without using SHLIB_COMPAT in this >> case will build the interfaces for ABIs that doe not require it. > > We could rename TEST_COMPAT and use that, I think it already has the > right semantics. Or you could use “ifdef have-GLIBC_2.32” at the > makefile level. I think TEST_COMPAT would be a better alternative since, it would give all the information how the symbol should be handled ABI wise on the C file instead of spreading over multiple files. > >>>> If we just defer the compat move, it would add the needless symbols on >>>> newer ABIs that we will need to keep supporting indefinitely (even >>>> though they won't be used anywhere unless user explicily links against >>>> a protected symbol) and we would eventually need to handle the y2038 >>>> support on old ABIs (with the _TIME_SIZE selection) by either adding >>>> proper 64-bit time support for by removing the xstat for good. >>> >>> See above, we can (and should) remove it on newer ABIs only. >> >> So now is we are moving in providing what is supposed to be compat >> symbols in the static library case as well. Do we really want to start >> supporting such scenario? > > Downstream, we do not need these symbols for fully static linking, so > SHLIB_COMPAT would actually be okay for our needs, I think. > > I guess if upstream rejects this, we can provide a stub library that can > be used to link against the __xstat et al. symbols as a workaround. But > if we need it, Debian (with its lack of per-release mass rebuilds) will > likely need it too, and some other distributions probably as well. So > at that point, I think we need to ask ourselves as upstream developers > whether we are really serving the needs of our users. I really not sure how is the best way to handle this transitions, since they tend to require a lot of time and affecting different releases. And it does not make sense to provide this specific stub libraries as different project, since it is a implementation detail from glibc itself. > > Maybe this is coming across a bit strongly, I just want to put it out > there. If Fedora rawhide breaks after we make a change that is > technically correct because it affects officially unsupported > configurations only, it makes sense to pause and think if what we are > doing is really correct. Thanks for bring this up, and I agree with you that this breakage might incur in more headaches than solutions. I will send a fix to export the xstat symbols in static objects as well, while preserving the compat symbols on shared objects. It is unfortunate that we need to add such workarounds, but it seems a better strategy.