diff options
| author | Daniel Borkmann <daniel@iogearbox.net> | 2018-12-19 00:27:24 +0100 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-12-19 00:30:05 +0100 |
| commit | dd4bfda9cfd1b0b4aad8760fc027cc81e0c6787f (patch) | |
| tree | 70590ac2bacf2a40aec88e06aca9e924e48695ef /include/linux | |
| parent | 0bae2d4d62d523f06ff1a8e88ce38b45400acd28 (diff) | |
| parent | 945a47d87cee24a95e11fdc0cd868b872f9b9616 (diff) | |
| download | cachepc-linux-dd4bfda9cfd1b0b4aad8760fc027cc81e0c6787f.tar.gz cachepc-linux-dd4bfda9cfd1b0b4aad8760fc027cc81e0c6787f.zip | |
Merge branch 'bpf-sk-msg-size-member'
John Fastabend says:
====================
This adds a size field to the sk_msg_md data structure used by SK_MSG
programs. Without this in the zerocopy case and in the copy case
where multiple iovs are in use its difficult to know how much data
can be pulled in. The normal method of reading data and data_end
only give the current contiguous buffer. BPF programs can attempt to
pull in extra data but have to guess if it exists. This can result
in multiple "guesses" its much better if we know upfront the size
of the sk_msg.
====================
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skmsg.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index 2a11e9d91dfa..eb8f6cb84c10 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -36,6 +36,9 @@ struct sk_msg_sg { struct scatterlist data[MAX_MSG_FRAGS + 1]; }; +/* UAPI in filter.c depends on struct sk_msg_sg being first element. If + * this is moved filter.c also must be updated. + */ struct sk_msg { struct sk_msg_sg sg; void *data; |
