From patchwork Thu Dec 7 11:05:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 81663 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 87535385DC07 for ; Thu, 7 Dec 2023 11:05:37 +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.133.124]) by sourceware.org (Postfix) with ESMTPS id A3B46385C411 for ; Thu, 7 Dec 2023 11:05:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3B46385C411 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 A3B46385C411 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701947125; cv=none; b=oZbMwOI2I+l5X6ky0Rs1tZIQMQbiZOUSo+7JO+I68SvMLE3PmX9M4G1lsPflSW8H/VuJeWxsDLlDKG6Qjf11oDm/FBSpznWGaC5cO/aAUmxcqniwPZC/gYduntGbM6Jcvvx+qe/y3KJ0UeDLF/mGa5+UJ7znkZDPN2ZVEfsCA8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701947125; c=relaxed/simple; bh=3rVURJFeNiOdbHomvZidL/BXGY/atDlThODQmuLPo8A=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=JLQ4EPriErQsIrWMU5YHHHM1M+JOpQTvAb9x/skIaC0KPiev/YrjOX/ooCJGaFqM8CtEhE6yMHqiqdGRH0FDbOjegm4hUUwVDnNVyhZjckUa/k4lpbKFbKDIqrBHd9zlz8/8HUl7NxdClU1nY8F9qH4GrcJRV/fKfsfI5AbXCHA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701947123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BlwKDw0/+ZPyN0/5tlNupQ0uSmvXPS0nbGA3E9Y50EE=; b=N7WjcDucxix5MMP9EmZvM96v4BCpXVwMIYeZuVooznN35dE+4Mr+/F2R1t8+e5MCe9zMPJ 2cveKgjXkmDjapohWog6gYHYZKk4GKu2sROsxVjSUNdaVNGaxbNLV1JGY6ambFgYXD9jjN JIy5HWBRZigQ4VXd0OelEGUVAHKuXJE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-84--EQX4B0nO4Wud1ISk1FN_w-1; Thu, 07 Dec 2023 06:05:21 -0500 X-MC-Unique: -EQX4B0nO4Wud1ISk1FN_w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 CA6E28352A1 for ; Thu, 7 Dec 2023 11:05:20 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.131]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4882F3C2E for ; Thu, 7 Dec 2023 11:05:20 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v2 1/2] elf: Wire up _dl_diagnostics_cpu_kernel In-Reply-To: Message-ID: References: X-From-Line: b4414f1eae4a6cf7f0424fff7596c364165f083e Mon Sep 17 00:00:00 2001 Date: Thu, 07 Dec 2023 12:05:18 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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+patchwork=sourceware.org@sourceware.org Some diagnostics information can only be retrieved in an OS-specific manner. This function does nothing at present. --- elf/Makefile | 1 + elf/dl-diagnostics-cpu-kernel.c | 24 ++++++++++++++++++++++++ elf/dl-diagnostics.c | 1 + elf/dl-diagnostics.h | 4 ++++ 4 files changed, 30 insertions(+) create mode 100644 elf/dl-diagnostics-cpu-kernel.c diff --git a/elf/Makefile b/elf/Makefile index afec7be084..d54e030b7a 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -130,6 +130,7 @@ rtld-routines = \ dl-compat \ dl-diagnostics \ dl-diagnostics-cpu \ + dl-diagnostics-cpu-kernel \ dl-diagnostics-kernel \ dl-environ \ dl-hwcaps \ diff --git a/elf/dl-diagnostics-cpu-kernel.c b/elf/dl-diagnostics-cpu-kernel.c new file mode 100644 index 0000000000..f3251c5b79 --- /dev/null +++ b/elf/dl-diagnostics-cpu-kernel.c @@ -0,0 +1,24 @@ +/* Print CPU/kernel diagnostics data in ld.so. Stub version. + Copyright (C) 2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +void +_dl_diagnostics_cpu_kernel (void) +{ +} diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c index d742cf0a99..48db1ac07b 100644 --- a/elf/dl-diagnostics.c +++ b/elf/dl-diagnostics.c @@ -255,6 +255,7 @@ _dl_print_diagnostics (char **environ) _dl_diagnostics_kernel (); _dl_diagnostics_cpu (); + _dl_diagnostics_cpu_kernel (); _exit (EXIT_SUCCESS); } diff --git a/elf/dl-diagnostics.h b/elf/dl-diagnostics.h index 8099b90951..5eda01b5e1 100644 --- a/elf/dl-diagnostics.h +++ b/elf/dl-diagnostics.h @@ -43,4 +43,8 @@ void _dl_diagnostics_kernel (void) attribute_hidden; _dl_print_diagnostics. */ void _dl_diagnostics_cpu (void) attribute_hidden; +/* Print diagnostics data for the CPU(s), in a kernel-secific fashion. + Called from _dl_print_diagnostics. */ +void _dl_diagnostics_cpu_kernel (void) attribute_hidden; + #endif /* _DL_DIAGNOSTICS_H */