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: <174399023133.47537.7375975856054461445.stgit@devnote2>
Date: Mon,  7 Apr 2025 10:43:51 +0900
From: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
To: Wei Yang <richard.weiyang@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Rapoport <rppt@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org,
	Mark Rutland <mark.rutland@....com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	linux-mm@...ck.org,
	Masami Hiramatsu <mhiramat@...nel.org>
Subject: [PATCH] memblock tests: Fix mutex related build error

From: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Fix mutex and free_reserved_area() related build errors which have
been introduced by commit 74e2498ccf7b ("mm/memblock: Add reserved
memory release function").

Fixes: 74e2498ccf7b ("mm/memblock: Add reserved memory release function")
Reported-by: Wei Yang <richard.weiyang@...il.com>
Closes: https://lore.kernel.org/all/20250405023018.g2ae52nrz2757b3n@master/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
---
 tools/testing/memblock/internal.h    |    6 ++++++
 tools/testing/memblock/linux/mutex.h |   14 ++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 tools/testing/memblock/linux/mutex.h

diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h
index 1cf82acb2a3e..0ab4b53bb4f3 100644
--- a/tools/testing/memblock/internal.h
+++ b/tools/testing/memblock/internal.h
@@ -24,4 +24,10 @@ static inline void accept_memory(phys_addr_t start, unsigned long size)
 {
 }
 
+static inline unsigned long free_reserved_area(void *start, void *end,
+					       int poison, const char *s)
+{
+	return 0;
+}
+
 #endif
diff --git a/tools/testing/memblock/linux/mutex.h b/tools/testing/memblock/linux/mutex.h
new file mode 100644
index 000000000000..ae3f497165d6
--- /dev/null
+++ b/tools/testing/memblock/linux/mutex.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _MUTEX_H
+#define _MUTEX_H
+
+#define DEFINE_MUTEX(name) int name
+
+static inline void dummy_mutex_guard(int *name)
+{
+}
+
+#define guard(mutex)	\
+	dummy_##mutex##_guard
+
+#endif /* _MUTEX_H */
\ No newline at end of file


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ