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

To pick the changes in:

  b848b26c ("net: Kill MSG_SENDPAGE_NOTLAST")
  5e2ff670 ("scm: add SO_PASSPIDFD and SCM_PIDFD")
  4fe38acd ("net: Block MSG_SENDPAGE_* from being passed to sendmsg() by userspace")
  b841b901 ("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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5b10c18d
...@@ -177,6 +177,7 @@ static inline size_t msg_data_left(struct msghdr *msg) ...@@ -177,6 +177,7 @@ static inline size_t msg_data_left(struct msghdr *msg)
#define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */ #define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */
#define SCM_CREDENTIALS 0x02 /* rw: struct ucred */ #define SCM_CREDENTIALS 0x02 /* rw: struct ucred */
#define SCM_SECURITY 0x03 /* rw: security label */ #define SCM_SECURITY 0x03 /* rw: security label */
#define SCM_PIDFD 0x04 /* ro: pidfd (int) */
struct ucred { struct ucred {
__u32 pid; __u32 pid;
...@@ -326,6 +327,7 @@ struct ucred { ...@@ -326,6 +327,7 @@ struct ucred {
*/ */
#define MSG_ZEROCOPY 0x4000000 /* Use user data in kernel path */ #define MSG_ZEROCOPY 0x4000000 /* Use user data in kernel path */
#define MSG_SPLICE_PAGES 0x8000000 /* Splice the pages from the iterator in sendmsg() */
#define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ #define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */
#define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exec for file #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exec for file
descriptor received through descriptor received through
...@@ -336,6 +338,9 @@ struct ucred { ...@@ -336,6 +338,9 @@ struct ucred {
#define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */ #define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */
#endif #endif
/* Flags to be cleared on entry by sendmsg and sendmmsg syscalls */
#define MSG_INTERNAL_SENDMSG_FLAGS \
(MSG_SPLICE_PAGES | MSG_SENDPAGE_NOPOLICY | MSG_SENDPAGE_DECRYPTED)
/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */ /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
#define SOL_IP 0 #define SOL_IP 0
......
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
#ifndef MSG_WAITFORONE #ifndef MSG_WAITFORONE
#define MSG_WAITFORONE 0x10000 #define MSG_WAITFORONE 0x10000
#endif #endif
#ifndef MSG_BATCH
#define MSG_BATCH 0x40000
#endif
#ifndef MSG_ZEROCOPY
#define MSG_ZEROCOPY 0x4000000
#endif
#ifndef MSG_SPLICE_PAGES #ifndef MSG_SPLICE_PAGES
#define MSG_SPLICE_PAGES 0x8000000 #define MSG_SPLICE_PAGES 0x8000000
#endif #endif
...@@ -50,6 +56,8 @@ static size_t syscall_arg__scnprintf_msg_flags(char *bf, size_t size, ...@@ -50,6 +56,8 @@ static size_t syscall_arg__scnprintf_msg_flags(char *bf, size_t size,
P_MSG_FLAG(NOSIGNAL); P_MSG_FLAG(NOSIGNAL);
P_MSG_FLAG(MORE); P_MSG_FLAG(MORE);
P_MSG_FLAG(WAITFORONE); P_MSG_FLAG(WAITFORONE);
P_MSG_FLAG(BATCH);
P_MSG_FLAG(ZEROCOPY);
P_MSG_FLAG(SPLICE_PAGES); P_MSG_FLAG(SPLICE_PAGES);
P_MSG_FLAG(FASTOPEN); P_MSG_FLAG(FASTOPEN);
P_MSG_FLAG(CMSG_CLOEXEC); P_MSG_FLAG(CMSG_CLOEXEC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment