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 ESMTPS id 461673858404 for ; Fri, 9 Feb 2024 19:08:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 461673858404 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 461673858404 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=1707505712; cv=none; b=C9opRpqtWw2xy3IRLFvkkVPw0azKNjDy+o2AlKqtOMd6KAD3VU9/+/3fIpZTiR18gSxNhLk3nroJD4Mb1mwu0874umLadEOEYqmkqs/cHp12ITnQyU4DoAS/KWWxR/YEVTyVLZhJldZkBsN0TG5P2EMqjXcsdLUUAesLY1lL8Q8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707505712; c=relaxed/simple; bh=UVlmwB5+csqefbnxrYXnRunyjstLXz7bBjK7ZaniAzc=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=per1T6cP/SbtDoJH7JxrjgJpCqjeTALk0tLh+2t3QPyFzt8fSe9Pb9KXsjq/0oBfYRhO0EN9rVFc9uK+XKpAdXFWJxo0pPQbL7cVZ0Bk2OB05Hsz+LRSCczAStqVM+mDei39F9HfBqUdYF9d4VYMBQ2gYGptpw9it1x0CBayhaU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707505710; 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=u1DCyEaZZJuwDFvg4/IzUugCV3TK9i2wx30LIGU3PL8=; b=HkINK2kPv1r51qY8c9AqmXowum65EEhLUedvtU+M0fL2pxn5x8/UnKutlonWvbE6OSqsSV 1Ixp57bxyFIEATKgpVhJuAO+S0ySHvUJnJRcsNd1tD9W0IGDIy6b8/auoKfg8+7EwuH/O5 OYAzAStLJA03V1S3Y2esP9QRd5Es+pA= 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-50-8PpW5sQ1PBWN3QK6GF3gRA-1; Fri, 09 Feb 2024 14:08:28 -0500 X-MC-Unique: 8PpW5sQ1PBWN3QK6GF3gRA-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 4085A85A58A for ; Fri, 9 Feb 2024 19:08:28 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.58]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC39DAC7F for ; Fri, 9 Feb 2024 19:08:27 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 1/2] elf: Wire up _dl_diagnostics_cpu_kernel In-Reply-To: Message-ID: <717acf6159c0f8801f58f75dbdab844f7de2dbd5.1707505012.git.fweimer@redhat.com> References: X-From-Line: 717acf6159c0f8801f58f75dbdab844f7de2dbd5 Mon Sep 17 00:00:00 2001 Date: Fri, 09 Feb 2024 20:08:25 +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 Content-Type: text/plain X-Spam-Status: No, score=-10.7 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_H5,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 List-Id: 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 5d78b659ce..0ecf9e207c 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 7345ebc4e5..352d68a759 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 1049a41118..8a3bc09815 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 */ -- 2.43.0