linux/arch
Michal Sekletar ea02f9411d net: introduce SO_BPF_EXTENSIONS
For user space packet capturing libraries such as libpcap, there's
currently only one way to check which BPF extensions are supported
by the kernel, that is, commit aa1113d9f8 ("net: filter: return
-EINVAL if BPF_S_ANC* operation is not supported"). For querying all
extensions at once this might be rather inconvenient.

Therefore, this patch introduces a new option which can be used as
an argument for getsockopt(), and allows one to obtain information
about which BPF extensions are supported by the current kernel.

As David Miller suggests, we do not need to define any bits right
now and status quo can just return 0 in order to state that this
versions supports SKF_AD_PROTOCOL up to SKF_AD_PAY_OFFSET. Later
additions to BPF extensions need to add their bits to the
bpf_tell_extensions() function, as documented in the comment.

Signed-off-by: Michal Sekletar <msekleta@redhat.com>
Cc: David Miller <davem@davemloft.net>
Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-18 19:08:58 -08:00
..
alpha net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
arc net: resort some Kbuild files to hopefully help avoid some conflicts 2014-01-13 21:48:16 -08:00
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-18 00:55:41 -08:00
arm64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-18 00:55:41 -08:00
avr32 net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
blackfin lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
c6x lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
cris net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
frv net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
hexagon net: resort some Kbuild files to hopefully help avoid some conflicts 2014-01-13 21:48:16 -08:00
ia64 net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
m32r net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
m68k lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
metag lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
microblaze net: resort some Kbuild files to hopefully help avoid some conflicts 2014-01-13 21:48:16 -08:00
mips net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
mn10300 net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
openrisc lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
parisc net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
powerpc net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
s390 net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
score net: resort some Kbuild files to hopefully help avoid some conflicts 2014-01-13 21:48:16 -08:00
sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-14 14:42:42 -08:00
sparc net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
tile lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
um lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
unicore32 lib: Add missing arch generic-y entries for asm-generic/hash.h 2013-12-17 21:26:19 -05:00
x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-18 00:55:41 -08:00
xtensa net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
.gitignore
Kconfig kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00