From patchwork Fri Apr 5 10:16:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1920173 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EvISkr63; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9vXp3sv9z1yZH for ; Fri, 5 Apr 2024 21:16:42 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACACB3846424 for ; Fri, 5 Apr 2024 10:16:40 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 21C2138460B2 for ; Fri, 5 Apr 2024 10:16:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21C2138460B2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 21C2138460B2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712312182; cv=none; b=YNtA0/ifPl7Vz24OFICrfBHmjUKQ8oYfTqkLSHCt7s+1pNERMGS6wxmaZg+BVaJJeJUdWMhbRaxeF43Z9jGKGhUBmG8atnRxSl/g2qaue4X8IFr9mq6TaUMVRv3oMgkVeDRAYFNQt9LqpwyyhFVD3TogiwMNVcDZCqVR4x0B5xM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712312182; c=relaxed/simple; bh=/kI9199HjrtJMHg0Vhyr3dOnUgTvzmqtA74UANo7mPY=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=qIl14agZ28J+2n3sTPN0fcmRreJEUMndnWvOQhNbgxCfgE76cCttWFqnWg0bk0YRfUY9DnTmUMngwMrTiDcXAcwx+s5AJRDC2Z4MUKAxAx9lJo4xqZHuMknlRI5NCuuzPnna4jqD4vhNmvcZnkaxsQXwqKljQirU5pMi7CIrKsM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712312177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zlvziZoABkrO3fy7wNd6wvEED12lTHa0GMHmit0hAkI=; b=EvISkr63aVlqgDM8ye18ZWIwSH2v8Eh2P3MLX++A1kLma+n0qws8YN13EiODPr7cHqfzHw 8tV0utgDA92HoazBfYm9DECeVSRdsGVvXd4kOoVeO29exeEWAzVI2NVtjWTTTX4np1QWDL oZZ6k52vI9Ga13y6/9iCsEg2ZY7QsjE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-vtYF1cepOmWl72FQZai0Fw-1; Fri, 05 Apr 2024 06:16:16 -0400 X-MC-Unique: vtYF1cepOmWl72FQZai0Fw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C6FB3C0BE20 for ; Fri, 5 Apr 2024 10:16:16 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF6382166B33 for ; Fri, 5 Apr 2024 10:16:15 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v3 0/3] Enhanced CPU diagnostics for ld.so Message-ID: X-From-Line: ddf8aad3798c861d5b8916c309135a90bf655ff3 Mon Sep 17 00:00:00 2001 Date: Fri, 05 Apr 2024 12:16:10 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org This version should be kernel-agnostic (although I cannot build-test it due to the broken Hurd build), and factors out the CPU iteration. There is also support for printing some system registers on AArch64. Thanks, Florian Florian Weimer (3): elf: Add CPU iteration support for future use in ld.so diagnostics x86: Add generic CPUID data dumper to ld.so --list-diagnostics aarch64: Enhanced CPU diagnostics for ld.so elf/dl-iterate_cpu.h | 135 +++++++++ manual/dynlink.texi | 119 +++++++- sysdeps/aarch64/dl-diagnostics-cpu.c | 84 ++++++ sysdeps/generic/dl-affinity.h | 54 ++++ sysdeps/unix/sysv/linux/dl-affinity.h | 46 +++ sysdeps/x86/dl-diagnostics-cpu.c | 384 ++++++++++++++++++++++++++ 6 files changed, 821 insertions(+), 1 deletion(-) create mode 100644 elf/dl-iterate_cpu.h create mode 100644 sysdeps/aarch64/dl-diagnostics-cpu.c create mode 100644 sysdeps/generic/dl-affinity.h create mode 100644 sysdeps/unix/sysv/linux/dl-affinity.h base-commit: 44ccc2465c6af5bd811d8258bf744aaafd5392fc