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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 0BD6E3857003 for ; Tue, 13 Oct 2020 10:32:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0BD6E3857003 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-135-p-kB9DRXNlaPpVDp0HQKCA-1; Tue, 13 Oct 2020 06:32:45 -0400 X-MC-Unique: p-kB9DRXNlaPpVDp0HQKCA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E4C518CA26C; Tue, 13 Oct 2020 10:32:44 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-114-237.ams2.redhat.com [10.36.114.237]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 874766EF7E; Tue, 13 Oct 2020 10:32:43 +0000 (UTC) From: Florian Weimer To: "H.J. Lu via Libc-alpha" Subject: Re: [PATCH] x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] References: <20201010132155.3340815-1-hjl.tools@gmail.com> Date: Tue, 13 Oct 2020 12:32:41 +0200 In-Reply-To: <20201010132155.3340815-1-hjl.tools@gmail.com> (H. J. Lu via Libc-alpha's message of "Sat, 10 Oct 2020 06:21:55 -0700") Message-ID: <87y2kav2k6.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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, 13 Oct 2020 10:32:51 -0000 * H. J. Lu via Libc-alpha: > GCC 11 supports -march=x86-64-v[234] to enable x86 micro-architecture ISA > levels: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97250 > > Binutils has been updated to support GNU_PROPERTY_X86_ISA_1_V[234] marker: > > https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/13 > > with > > commit 32930e4edbc06bc6f10c435dbcc63131715df678 > Author: H.J. Lu > Date: Fri Oct 9 05:05:57 2020 -0700 > > x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker > > in x86 ELF binaries to indicate the micro-architecture ISA level required > to execute the binary. I'm not sure if this is the right design. But maybe it helps to get vendors to stop releasing new v2-only CPUs. 8-/ > Add GNU_PROPERTY_X86_ISA_1_V[234] marker support to ld.so if binutils > 2.32 or newer is used to build glibc: > > 1. Add GNU_PROPERTY_X86_ISA_1_V[234] markers to elf.h. > 2. Add GNU_PROPERTY_X86_ISA_1_V[234] marker to abi-note.o based on the > ISA level used to compile abi-note.o, assuming that the same ISA level > is used to compile the whole glibc. > 3. Add isa_1 to cpu_features to record the supported x86 ISA level. > 4. Rename _dl_process_cet_property_note to _dl_process_property_note and > add GNU_PROPERTY_X86_ISA_1_V[234] marker detection. > 5. Update _rtld_main_check and _dl_open_check to check loaded objects > with the incompatible ISA level. > 6. Add a testcase to verify that dlopen an x86-64-v4 shared object fails > on lesser platforms. It's not clear based on this description if the expectation is that the search for alternative implementations continues after an attempt to load an object fails due to an architecture level mismatch. 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