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-prev] [day] [month] [year] [list]
Message-ID: <20250428063300.7137-2-yangtiezhu@loongson.cn>
Date: Mon, 28 Apr 2025 14:32:59 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Christian Brauner <brauner@...nel.org>,
	Shuah Khan <shuah@...nel.org>
Cc: linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] selftests: pid_namespace: Include sys/mount.h

When executing "make -C tools/testing/selftests/pid_namespace", there exist
many errors such as:

  $ make -C tools/testing/selftests/pid_namespace
  ...
  pid_max.c:42:15: error: implicit declaration of function 'mount' [-Wimplicit-function-declaration]
  ...
  pid_max.c:42:36: error: 'MS_PRIVATE' undeclared (first use in this function); did you mean 'MAP_PRIVATE'?
  ...
  pid_max.c:42:49: error: 'MS_REC' undeclared (first use in this function)
  ...

Include sys/mount.h to fix the errors, tested on x86_64 and LoongArch.

Reported-by: Haiyong Sun <sunhaiyong@...ngson.cn>
Fixes: 615ab43b838b ("tests/pid_namespace: add pid_max tests")
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
 tools/testing/selftests/pid_namespace/pid_max.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/pid_namespace/pid_max.c b/tools/testing/selftests/pid_namespace/pid_max.c
index 51c414faabb0..96f274f0582b 100644
--- a/tools/testing/selftests/pid_namespace/pid_max.c
+++ b/tools/testing/selftests/pid_namespace/pid_max.c
@@ -10,6 +10,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <syscall.h>
+#include <sys/mount.h>
 #include <sys/wait.h>
 
 #include "../kselftest_harness.h"
-- 
2.42.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ