From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 9A046385740C for ; Fri, 9 Jul 2021 20:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A046385740C Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-458-fgvEGz5aPj66RlM0ngs_bA-1; Fri, 09 Jul 2021 16:01:46 -0400 X-MC-Unique: fgvEGz5aPj66RlM0ngs_bA-1 Received: by mail-qv1-f72.google.com with SMTP id g11-20020a0562140acbb02902c77e759580so7206625qvi.4 for ; Fri, 09 Jul 2021 13:01:46 -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:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=pAWfTNibRyi7Sq03/Vicx8QDqqTfZosKm59hKCFBJr8=; b=rL95U5fsd/xJZWuhAUP4DyawAD6rW/sGW3dfh8h+XCSDAUQMkVOZRnlq53euVPF9D0 HVv2RbXAmXgRxe9tNvKOfArigxXlvyvIzv3Zh7vH9lCiRtK529e4+47GtyxR22siJ0uT eF+1ZlOWZEH123xPAvigCvgLY+S0JVdDxdAF2jeLgVAHtjNNdoRPY8LbYGkO0uoYxK+m ntSVA+y3CpxeXE9QsGogPNae0gQmGHcFuh5PniKO0Zb2VD8WpbFBmtxrCvV2hTLQf8Cc 26rgpGUxLU9/ld43UcdRg1i+UZfU0lRez+HprNqu44sQbBpPr53284PGfOCeiL0D5XWQ GFpg== X-Gm-Message-State: AOAM531DPXQpdErj9/o9l7C+AsQ70cwJGYdsCqxJOg1KOj35Q90oiuQ3 NBObhP7pPjPMnpU/xUxW7t2+9f7buMe1vhijN5J2nEKX6Usb1sADvybe4HeIBptk+Naaluze00Z 5SPd+liIvoNnBWvbAvKqPTJXaOtXEHivFuEU/iQ3EIUw6BcxzWPxxoxIvr1gCW/unK7iNjg== X-Received: by 2002:a37:b942:: with SMTP id j63mr39748617qkf.430.1625860906118; Fri, 09 Jul 2021 13:01:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv46sdQozvffKTYWCHMdZMKqM9KO0Ty45d/IUa7ph+Zscw/8P8PKJDjBW/wH2faRo+Z2a6MQ== X-Received: by 2002:a37:b942:: with SMTP id j63mr39748591qkf.430.1625860905879; Fri, 09 Jul 2021 13:01:45 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id r187sm2363657qkb.129.2021.07.09.13.01.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jul 2021 13:01:45 -0700 (PDT) Subject: Re: [PATCH] x86: Install [BZ #27958] To: "H.J. Lu" , libc-alpha@sourceware.org References: <20210605135947.469959-1-hjl.tools@gmail.com> From: Carlos O'Donell Organization: Red Hat Message-ID: <83077104-ea01-0afc-5636-87e1039d463a@redhat.com> Date: Fri, 9 Jul 2021 16:01:44 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210605135947.469959-1-hjl.tools@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Fri, 09 Jul 2021 20:01:49 -0000 On 6/5/21 9:59 AM, H.J. Lu via Libc-alpha wrote: > Install for which includes > . > > Fixes BZ #27958. The constants in bits/platform/x86.h are largely ABI given the behaviour of the cpuid instruction. Likewise we do a consistent mapping between the cpuid_array <-> usable_array without exposing internal details. The API in sys/platform/x86.h has already been reviewed, discussed, and exposes HAS_CPU_FEATURE(name) and CPU_FEATURE_USABLE(name). Given that we get one more chance at review let me ask a few final questions. (1) API prefixes in macros help developers remember names. Consistent prefix for APIs help developers remember. We use HAS_* but also CPU_* which requires the programmer remember two distinct naming strategies. Suggestion: CPU_FEATURE_PRESENT(), CPU_FEATURE_USABLE()? Note: We do this in the underlying name e.g. x86_cpu_* has_feature (could be is_present) vs. is_usable. (2) ABI testing? - How are we making sure we don't accidentally break ABI? - Do we need any further testing? - Do we have a decoupled test to ensure a refactor doesn't break things? - We have tst-cpu-features-cpuinfo.c, which should cover comparison to the decoupled cpuinfo. Notes: - We will not be able to avoid in-place-update failures, in that rpm will do an atomic rename that unlinks the old libc.so.6 with the new libc.so.6 and if ld.so is not yet updated or updated first then a process that starts will crash. This makes it error prone to update the ABI in downstream minor updates. > --- > sysdeps/x86/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile > index 346ec491b3..567ea54243 100644 > --- a/sysdeps/x86/Makefile > +++ b/sysdeps/x86/Makefile > @@ -5,7 +5,7 @@ endif > ifeq ($(subdir),elf) > sysdep_routines += get-cpuid-feature-leaf > sysdep-dl-routines += dl-get-cpu-features > -sysdep_headers += sys/platform/x86.h > +sysdep_headers += sys/platform/x86.h bits/platform/x86.h > > CFLAGS-get-cpuid-feature-leaf.o += $(no-stack-protector) -- Cheers, Carlos.