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

perf beauty: Update copy of linux/socket.h with the kernel sources

To pick the changes in:

b848b26c6672c9b9 ("net: Kill MSG_SENDPAGE_NOTLAST")
5e2ff6704a275be0 ("scm: add SO_PASSPIDFD and SCM_PIDFD")
4fe38acdac8a71f7 ("net: Block MSG_SENDPAGE_* from being passed to sendmsg() by userspace")
b841b901c452d926 ("net: Declare MSG_SPLICE_PAGES internal sendmsg() flag")

That don't result in any changes in the tables generated from that
header.

But while updating I noticed we were not handling MSG_BATCH and MSG_ZEROCOPY in the
hard coded table for the msg flags table, add them.

This silences this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Cc: David Howells <dhowells@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ian Rogers <irogers@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/ZLFGuHDwUGDGXdoR@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+13
+5
tools/perf/trace/beauty/include/linux/socket.h
··· 177 177 #define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */ 178 178 #define SCM_CREDENTIALS 0x02 /* rw: struct ucred */ 179 179 #define SCM_SECURITY 0x03 /* rw: security label */ 180 + #define SCM_PIDFD 0x04 /* ro: pidfd (int) */ 180 181 181 182 struct ucred { 182 183 __u32 pid; ··· 327 326 */ 328 327 329 328 #define MSG_ZEROCOPY 0x4000000 /* Use user data in kernel path */ 329 + #define MSG_SPLICE_PAGES 0x8000000 /* Splice the pages from the iterator in sendmsg() */ 330 330 #define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ 331 331 #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exec for file 332 332 descriptor received through ··· 338 336 #define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */ 339 337 #endif 340 338 339 + /* Flags to be cleared on entry by sendmsg and sendmmsg syscalls */ 340 + #define MSG_INTERNAL_SENDMSG_FLAGS \ 341 + (MSG_SPLICE_PAGES | MSG_SENDPAGE_NOPOLICY | MSG_SENDPAGE_DECRYPTED) 341 342 342 343 /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */ 343 344 #define SOL_IP 0
+8
tools/perf/trace/beauty/msg_flags.c
··· 8 8 #ifndef MSG_WAITFORONE 9 9 #define MSG_WAITFORONE 0x10000 10 10 #endif 11 + #ifndef MSG_BATCH 12 + #define MSG_BATCH 0x40000 13 + #endif 14 + #ifndef MSG_ZEROCOPY 15 + #define MSG_ZEROCOPY 0x4000000 16 + #endif 11 17 #ifndef MSG_SPLICE_PAGES 12 18 #define MSG_SPLICE_PAGES 0x8000000 13 19 #endif ··· 56 50 P_MSG_FLAG(NOSIGNAL); 57 51 P_MSG_FLAG(MORE); 58 52 P_MSG_FLAG(WAITFORONE); 53 + P_MSG_FLAG(BATCH); 54 + P_MSG_FLAG(ZEROCOPY); 59 55 P_MSG_FLAG(SPLICE_PAGES); 60 56 P_MSG_FLAG(FASTOPEN); 61 57 P_MSG_FLAG(CMSG_CLOEXEC);