lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221220102318.3418501-1-rickaran@axis.com>
Date:   Tue, 20 Dec 2022 11:23:18 +0100
From:   Rickard Andersson <rickaran@...s.com>
To:     <linux-kernel@...r.kernel.org>, <oberpar@...ux.ibm.com>
CC:     <rickard314.andersson@...il.com>, <mliska@...e.cz>,
        <Jesper.Nilsson@...s.com>, Rickard x Andersson <rickaran@...s.com>,
        <stable@...r.kernel.org>
Subject: [PATCH v2] gcov: Add support for checksum field

From: Rickard x Andersson <rickaran@...s.com>

In GCC version 12.1 a checksum field was added.

This patch fixes a kernel crash occurring during boot when
using gcov-kernel with GCC version 12.2. The crash occurred on
a system running on i.MX6SX.

Fixes: 977ef30a7d88 ("gcov: support GCC 12.1 and newer compilers")
Signed-off-by: Rickard x Andersson <rickaran@...s.com>
Reviewed-by: Peter Oberparleiter <oberpar@...ux.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@...ux.ibm.com>
Cc: <stable@...r.kernel.org>
---
 kernel/gcov/gcc_4_7.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index c699feda21ac..04880d8fba25 100644
--- a/kernel/gcov/gcc_4_7.c
+++ b/kernel/gcov/gcc_4_7.c
@@ -85,6 +85,7 @@ struct gcov_fn_info {
  * @version: gcov version magic indicating the gcc version used for compilation
  * @next: list head for a singly-linked list
  * @stamp: uniquifying time stamp
+ * @checksum: unique object checksum
  * @filename: name of the associated gcov data file
  * @merge: merge functions (null for unused counter type)
  * @n_functions: number of instrumented functions
@@ -97,6 +98,10 @@ struct gcov_info {
 	unsigned int version;
 	struct gcov_info *next;
 	unsigned int stamp;
+ /* Since GCC 12.1 a checksum field is added. */
+#if (__GNUC__ >= 12)
+	unsigned int checksum;
+#endif
 	const char *filename;
 	void (*merge[GCOV_COUNTERS])(gcov_type *, unsigned int);
 	unsigned int n_functions;
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ