From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> From: "H.J. Lu" Date: Thu, 28 Oct 2021 07:17:05 -0700 Message-ID: Subject: Re: RFC: Add GNU_PROPERTY_1_GLIBC_2_NEEDED To: Florian Weimer Cc: "H.J. Lu via Libc-alpha" , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 28 Oct 2021 14:17:44 -0000 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.