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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240903.020556-bouncing.saws.daring.donor-5KuFrSsG4K2W@cyphar.com>
Date: Tue, 3 Sep 2024 12:41:08 +1000
From: Aleksa Sarai <cyphar@...har.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Christian Brauner <brauner@...nel.org>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the vfs-brauner tree

On 2024-09-03, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> Hi all,
> 
> After merging the vfs-brauner tree, today's linux-next build (native perf)
> failed like this:
> 
> In file included from trace/beauty/fs_at_flags.c:21:
> perf/trace/beauty/generated/fs_at_flags_array.c:10:31: error: initialized field overwritten [-Werror=override-init]
>    10 |         [ilog2(0x0001) + 1] = "RENAME_NOREPLACE",
>       |                               ^~~~~~~~~~~~~~~~~~
> perf/trace/beauty/generated/fs_at_flags_array.c:10:31: note: (near initialization for 'fs_at_flags[1]')
> perf/trace/beauty/generated/fs_at_flags_array.c:14:30: error: initialized field overwritten [-Werror=override-init]
>    14 |         [ilog2(0x200) + 1] = "HANDLE_FID",
>       |                              ^~~~~~~~~~~~
> perf/trace/beauty/generated/fs_at_flags_array.c:14:30: note: (near initialization for 'fs_at_flags[10]')
> perf/trace/beauty/generated/fs_at_flags_array.c:15:30: error: initialized field overwritten [-Werror=override-init]
>    15 |         [ilog2(0x001) + 1] = "HANDLE_MNT_ID_UNIQUE",
>       |                              ^~~~~~~~~~~~~~~~~~~~~~
> perf/trace/beauty/generated/fs_at_flags_array.c:15:30: note: (near initialization for 'fs_at_flags[1]')
> 
> Caused by commit
> 
>   34cf40849654 ("uapi: explain how per-syscall AT_* flags should be allocated")
> 
> I have used the vfs-brauner tree from next-20240902 for today.

Ah okay, the overlapping flag definitions in the copied over fcntl.h are
causing issues. We could just drop that part of the patch, or (since the
new flags aren't handled by perf/trace/beauty) we could just do
something simple like:

diff --git a/tools/perf/trace/beauty/fs_at_flags.sh b/tools/perf/trace/beauty/fs_at_flags.sh
index 456f59addf74..930384029599 100755
--- a/tools/perf/trace/beauty/fs_at_flags.sh
+++ b/tools/perf/trace/beauty/fs_at_flags.sh
@@ -13,9 +13,13 @@ printf "static const char *fs_at_flags[] = {\n"
 regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+AT_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
 # AT_EACCESS is only meaningful to faccessat, so we will special case it there...
 # AT_STATX_SYNC_TYPE is not a bit, its a mask of AT_STATX_SYNC_AS_STAT, AT_STATX_FORCE_SYNC and AT_STATX_DONT_SYNC
+# AT_RENAME_* flags are just aliases of RENAME_* flags and we don't need to include them.
+# AT_HANDLE_* flags are only meaningful for name_to_handle_at, which we don't support.
 grep -E $regex ${linux_fcntl} | \
        grep -v AT_EACCESS | \
        grep -v AT_STATX_SYNC_TYPE | \
+       grep -Ev "AT_RENAME_(NOREPLACE|EXCHANGE|WHITEOUT)" | \
+       grep -Ev "AT_HANDLE_(FID|MNT_ID_UNIQUE)" | \
        sed -r "s/$regex/\2 \1/g"       | \
        xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
 printf "};\n"

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ