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: <20230103102755.eks34kwcufoz7znx@wittgenstein>
Date:   Tue, 3 Jan 2023 11:27:55 +0100
From:   Christian Brauner <brauner@...nel.org>
To:     Siddh Raman Pant <code@...dh.me>
Cc:     Seth Forshee <sforshee@...nel.org>, Shuah Khan <shuah@...nel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-kselftests <linux-kselftest@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] selftests/mount_setattr: Remove redefinition of struct
 mount_attr

On Sun, Dec 11, 2022 at 02:58:20PM +0530, Siddh Raman Pant wrote:
> It is already included via sys/mount.h on line 10.
> 
> GCC error reproducible by: make kselftest TARGETS="mount_setattr"
> 
> mount_setattr_test.c:107:8: error: redefinition of ‘struct mount_attr’
>   107 | struct mount_attr {
>       |        ^~~~~~~~~~
> In file included from /usr/include/x86_64-linux-gnu/sys/mount.h:32,
>                  from mount_setattr_test.c:10:
> ../../../../usr/include/linux/mount.h:129:8: note: originally defined here
>   129 | struct mount_attr {
>       |        ^~~~~~~~~~
> 
> Signed-off-by: Siddh Raman Pant <code@...dh.me>
> ---
>  tools/testing/selftests/mount_setattr/mount_setattr_test.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> index 8c5fea68ae67..582669ca38e9 100644
> --- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> +++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> @@ -103,13 +103,6 @@
>  	#else
>  		#define __NR_mount_setattr 442
>  	#endif
> -
> -struct mount_attr {
> -	__u64 attr_set;
> -	__u64 attr_clr;
> -	__u64 propagation;
> -	__u64 userns_fd;
> -};
>  #endif

Honestly, until the conflicts between linux/mount.h and sys/mount.h are
fixed properly we should probably just not include either linux/mount.h
nor sys/mount.h and just define all the things we need in this single
test file.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ