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: <20231025214811.2066376-1-mathieu.desnoyers@efficios.com>
Date:   Wed, 25 Oct 2023 17:48:11 -0400
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH] Fix: rseq uapi: Adapt header includes to follow glibc header changes

With "recent" glibc headers, using <sys/types.h> with __GNU_SOURCE fails
to have __u32 and others types needed by the rseq.h uapi header file.
Include ctype.h and asm/types.h to fix this. Add a __KERNEL__ #ifdef to
select the kernel vs userspace header includes.

Also, remove the now unneeded asm/byteorder.h include, since it also
causes its own build issues with "recent" glibc headers.

I'm cautiously using the term "recent" glibc here because I don't know
exactly in which glibc versions those changes happened. Steven
reproduced this issue with glibc 2.37 on Debian.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Reported-by: Steven Rostedt (Google) <rostedt@...dmis.org>
Cc: Steven Rostedt (Google) <rostedt@...dmis.org>
Cc: Peter Zijlstra (Intel) <peterz@...radead.org>
---
 include/uapi/linux/rseq.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h
index c233aae5eac9..0f9cd8211ff0 100644
--- a/include/uapi/linux/rseq.h
+++ b/include/uapi/linux/rseq.h
@@ -10,8 +10,12 @@
  * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
  */
 
-#include <linux/types.h>
-#include <asm/byteorder.h>
+#ifdef __KERNEL__
+# include <linux/types.h>
+#else
+# include <ctype.h>
+# include <asm/types.h>
+#endif
 
 enum rseq_cpu_id_state {
 	RSEQ_CPU_ID_UNINITIALIZED		= -1,
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ