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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409105326.0686ae7a@gmx.net>
Date: Wed, 9 Apr 2025 10:53:26 +0200
From: Peter Seiderer <ps.report@....net>
To: "T.J. Mercier" <tjmercier@...gle.com>
Cc: Christian Brauner <brauner@...nel.org>, Shuah Khan <shuah@...nel.org>,
 Alexander Mikhalitsyn <alexander@...alicyn.com>,
 linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v2] selftests: pid_namespace: Add missing sys/mount.h

Hello T.J.,

On Tue,  8 Apr 2025 23:02:02 +0000, "T.J. Mercier" <tjmercier@...gle.com> wrote:

> pid_max.c: In function ‘pid_max_cb’:
> pid_max.c:42:15: error: implicit declaration of function ‘mount’
>                                        [-Wimplicit-function-declaration]
>    42 |         ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0);
>       |               ^~~~~
> pid_max.c:42:36: error: ‘MS_PRIVATE’ undeclared (first use in this
>                                   function); did you mean ‘MAP_PRIVATE’?
>    42 |         ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0);
>       |                                    ^~~~~~~~~~
>       |                                    MAP_PRIVATE
> pid_max.c:42:49: error: ‘MS_REC’ undeclared (first use in this function)
>    42 |         ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0);
>       |                                                 ^~~~~~
> pid_max.c:48:9: error: implicit declaration of function ‘umount2’; did
>                you mean ‘SYS_umount2’? [-Wimplicit-function-declaration]
>    48 |         umount2("/proc", MNT_DETACH);
>       |         ^~~~~~~
>       |         SYS_umount2
> pid_max.c:48:26: error: ‘MNT_DETACH’ undeclared (first use in this
>                                                                function)
>    48 |         umount2("/proc", MNT_DETACH);
> 
> Fixes: 615ab43b838b ("tests/pid_namespace: add pid_max tests")
> Signed-off-by: T.J. Mercier <tjmercier@...gle.com>
> ---
>  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"

Predated patch already available, see

	https://lore.kernel.org/linux-kselftest/20250115105211.390370-3-ps.report@gmx.net/

Regards,
Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ