Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools include UAPI: Update linux/mount.h copy

To pick the changes from:

dab741e0e02bd3c4 ("Add a "nosymfollow" mount option.")

That ends up adding support for the new MS_NOSYMFOLLOW mount flag:

$ tools/perf/trace/beauty/mount_flags.sh > before
$ cp include/uapi/linux/mount.h tools/include/uapi/linux/mount.h
$ tools/perf/trace/beauty/mount_flags.sh > after
$ diff -u before after
--- before 2020-11-03 08:51:28.117997454 -0300
+++ after 2020-11-03 08:51:38.992218869 -0300
@@ -7,6 +7,7 @@
[32 ? (ilog2(32) + 1) : 0] = "REMOUNT",
[64 ? (ilog2(64) + 1) : 0] = "MANDLOCK",
[128 ? (ilog2(128) + 1) : 0] = "DIRSYNC",
+ [256 ? (ilog2(256) + 1) : 0] = "NOSYMFOLLOW",
[1024 ? (ilog2(1024) + 1) : 0] = "NOATIME",
[2048 ? (ilog2(2048) + 1) : 0] = "NODIRATIME",
[4096 ? (ilog2(4096) + 1) : 0] = "BIND",
$

So now one can use it in --filter expressions for tracepoints.

This silences this perf build warnings:

Warning: Kernel ABI header at 'tools/include/uapi/linux/mount.h' differs from latest version at 'include/uapi/linux/mount.h'
diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mattias Nissler <mnissler@chromium.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+1
+1
tools/include/uapi/linux/mount.h
··· 16 16 #define MS_REMOUNT 32 /* Alter flags of a mounted FS */ 17 17 #define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ 18 18 #define MS_DIRSYNC 128 /* Directory modifications are synchronous */ 19 + #define MS_NOSYMFOLLOW 256 /* Do not follow symlinks */ 19 20 #define MS_NOATIME 1024 /* Do not update access times. */ 20 21 #define MS_NODIRATIME 2048 /* Do not update directory access times */ 21 22 #define MS_BIND 4096