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: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,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 8D0381F953 for ; Thu, 28 Oct 2021 14:19:03 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B0B4385843C for ; Thu, 28 Oct 2021 14:19:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B0B4385843C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635430742; bh=T+i9cuE/xKW1QBs6OjNDRhYBzN8psbItLf2tcPQ2xT4=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cr3cI1p91IY1DYawFglorY7ssE3lLeCwO8mTGyRp13s65IA/GzpW4y7kkWKLz37nv jN8RMhlBeuL0KX+6bCQ0c6RhNczrb5QQLc4AFDWXa0aK/BuVQcCJKKg+a3m3u6d1Zm /u2s+trQJLHpOra22kBdnc+wZtiu+9e9cCdZSRnY= Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id 7D3C33858C39; Thu, 28 Oct 2021 14:17:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D3C33858C39 Received: by mail-pj1-x102a.google.com with SMTP id gn3so4834186pjb.0; Thu, 28 Oct 2021 07:17:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T+i9cuE/xKW1QBs6OjNDRhYBzN8psbItLf2tcPQ2xT4=; b=NS0BOHKemQqSO5yf00706F3TnVYaVdKWshE9F1R6QGaKuMM6eUJqzdnybebFdCOtgx o2+VM/mcNLVhQImS15k1P9zt8MFiLBuN1bATqQ2mUr+N6zzJZjRdn0JbcC0mVblGF7rs yekb6d2POolaABaRUdU2NGBo/n24ydnl+13X3tLbVfcCmrQduJmLC6rZiHthXKWCXEGk H8CjFZPHjLWszI4BEMwqqK9wlMaKOkbwHsOX10ZkJntcjM7poeVrTUIfnNlxJC8er5AV OQT1o9OAFfasCOvUKmnYBiOByttmHz6ar5fIB0sB5zlOXVvA2wvLn4bsY8IaRXv1fCPY pX5Q== X-Gm-Message-State: AOAM531Cn9fhfIRI98/GYezlLn3tI2mRlRp6Huul0x/4E6Bp/MUpjVf7 ntTlZlcxEQXg6Jn/VNbavuG+5JHn8iOHkIBefmLjaJ3OEPQ= X-Google-Smtp-Source: ABdhPJweGSP/NsKVWvPjsYRGAGRn3tLQ9L5vwOye/4gbN7PeYQzgPYPXLuLI+ESkNXxMiYMh17GIQRhLW+XtBymnils= X-Received: by 2002:a17:903:1111:b0:13f:d1d7:fb67 with SMTP id n17-20020a170903111100b0013fd1d7fb67mr3956128plh.85.1635430661607; Thu, 28 Oct 2021 07:17:41 -0700 (PDT) MIME-Version: 1.0 References: <87zgqvq03g.fsf@oldenburg.str.redhat.com> <87v91hljth.fsf@oldenburg.str.redhat.com> <87k0hxkzrz.fsf@oldenburg.str.redhat.com> In-Reply-To: <87k0hxkzrz.fsf@oldenburg.str.redhat.com> Date: Thu, 28 Oct 2021 07:17:05 -0700 Message-ID: Subject: Re: RFC: Add GNU_PROPERTY_1_GLIBC_2_NEEDED To: Florian Weimer Content-Type: text/plain; charset="UTF-8" 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: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: "H.J. Lu via Libc-alpha" , Binutils Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Thu, Oct 28, 2021 at 7:08 AM Florian Weimer wrote: > > * H. J. Lu: > > > I am not sure if I am following your concerns. We have an ELF feature, > > like DT_RELR, which is tied to a glibc version. The binary with DT_RELR > > will crash with the older glibcs. And you DON'T want such a binary with > > a dependency on the required glibc version. Can you tell me why? > > Historically, such features have not been tied to a glibc version. CET, > DT_AUDIT, AArch64 variant PCS support, nearly arbitrary calling > convention support on x86-64 all are not really version-specific (they > have been backported to varying degrees), and those involve dynamic > linker features. > > In contrast, if DT_RELR support is indicated by a GLIBC_2.35 version > dependency, it is necessary to backport all of the GLIBC_2.35 symbol set > as part of the DT_RELR backport. This means such backports are usually > not feasible. So you would like to backport DT_RELR. > >> >> The problem that linkers and loaders ignore unknown types should be > >> >> tackled in a different way, e.g. by flagging critical types in some way. > >> >> See: > >> >> > >> >> Critical program headers and dynamic tags > >> >> > >> >> > >> > > >> > This won't help the existing ld.so binaries which this proposal > >> > is addressing. > >> > >> We need to increase the ABI version once, to signal the requirement for > >> critical tags checking. > >> > > > > Which ABI version? .note.ABI-tag or EI_ABIVERSION? A binary linked > > against glibc 2.40 without DT_RELR can run with glibc 2.34. But a binary > > linked against glibc 2.30 with DT_RELR won't run with glibc 2.34 at all. > > Increasing the ABI version doesn't solve the DT_RELR issue. > > The way EI_ABIVERSION works is that the link editor produces the minimum > version needed by the features in the binary. > > So if the link editor DT_RELR, it would produce a DT_CRITICAL_DT tag for > DT_RELR and set EI_ABIVERSION for critical DT tag support. Similar for > other critical DT Tags. If no critical DT tags are used, an earlier > EI_ABIVERSION can be used. > There is no DT_CRITICAL_DT support in the older glibcs. The only option is EI_ABIVERSION and I don't think we need DT_CRITICAL_DT. We update EI_ABIVERSION whenever there is a new feature added. I think it is one missing piece in the original DT_RELR proposal. -- H.J.