From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 759B438708F9 for ; Tue, 22 Dec 2020 11:42:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 759B438708F9 Received: by mail-oi1-x233.google.com with SMTP id d203so14497221oia.0 for ; Tue, 22 Dec 2020 03:42:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a/kLJBJoRimJXAHFae8oq5BVpbcQirHFGHJnfl2JWsM=; b=daePK57SpouKRoSuS7bMDYGE66jo/NsWwoUpqLihgPhzk1aSzdwUY+e7G0AdXnajIY rEKeh8jyuNdrJeR+UjK/3YgixhIfEb8UMEwlovkwJ5nYeKRnw5rCA52arp5LssqYXoSe LCO2Eig2vRvnhtehzNKvjpBXz86oMqqtnYNB/OHBuXpi893KHLVIEAnYlNq+WHF/edCQ hrrtQ9I+zIvjsbh4fFciW19868IWrMIflGkPgXyNT3E4ubR+5KBVwAodM7gKObgBR4S2 NkTd7t5gPW9S/8jPiYzppaBfo6s01POlesXAFhUwFDf0DKm8HH/cw1SZG6wwI+gtprXR shRg== X-Gm-Message-State: AOAM530T5ccSq72hYxhU03tQAcotwEwvaeKyBqrAO7rVK91eBf4dr1QU M18yVpwOMC8Tzm4cwmG8BlZedu4+6nnFnndfWes= X-Google-Smtp-Source: ABdhPJySkq5bu7EMCVI206ZeE+K0b3qVE4wnNRuxd9FeDgcTt1R0VwxI8WlU5brJGaPV3V1h2TdU7tagev4hyFA8dsk= X-Received: by 2002:aca:f5d3:: with SMTP id t202mr14083119oih.25.1608637355975; Tue, 22 Dec 2020 03:42:35 -0800 (PST) MIME-Version: 1.0 References: <875z4vxqjl.fsf@oldenburg2.str.redhat.com> In-Reply-To: From: "H.J. Lu" Date: Tue, 22 Dec 2020 03:42:00 -0800 Message-ID: Subject: Re: Compatibility issues around To: Florian Weimer Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3030.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.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: Tue, 22 Dec 2020 11:42:37 -0000 On Mon, Dec 21, 2020 at 9:05 AM H.J. Lu wrote: > > On Mon, Dec 21, 2020 at 5:00 AM Florian Weimer wrote: > > > > I finally had some time to review the interface. > > > > I have two major concerns: > > > > (a) Placement of struct cpu_features in _rtld_global_ro > > > > This means that backporting new feature support changes the internal > > GLIBC_PRIVATE ABI. Consequently, there's a race condition during > > in-place updates where loading binaries can fail in obscure ways, due to > > the change in _rtld_global_ro offsets. We should really avoid this. > > This applies to all members in _rtld_global_ro. > > > (c) The COMMON_CPUID_INDEX_MAX handshake does not work. > > > > __x86_get_cpu_features returns NULL if its argument is too large. This > > effectively disables *all* feature bits, not just those beyond > > COMMON_CPUID_INDEX_MAX. This means that if you build with a header that > > Can you open a glibc bug? It shouldn't be too hard to fix. I can take > a look if you don't have time. https://sourceware.org/bugzilla/show_bug.cgi?id=27104 A patch is posted at https://sourceware.org/pipermail/libc-alpha/2020-December/120968.html > > is too new, an application may fail due to the lack of detected features > > when running on an older glibc version. Ideally, only the newly added > > CPU features would be detected as missing in this scenario. Simply > > recompiling an application with a newer header should not result in any > > detection changes. > > > > > > Not quite a major concern is that this feature is not usable from IFUNC > > resolvers with BIND_NOW, which I consider an important use of CPU > > feature selection. I do not have a good solution here that can be > > implemented in time for glibc 2.33. I expect that a proper solution > > will require some binutils work. > > Can you open a glibc bug? > > > I'm going to work on this with priority this week and hope to have > > patches posted by the 24th. > > > > Thanks, > > Florian > > -- > > Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, > > Commercial register: Amtsgericht Muenchen, HRB 153243, > > Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill > > > > > -- > H.J. -- H.J.