linux_dsm_epyc7002/include/uapi/linux/tc_act
Daniel Borkmann f1f7714ea5 bpf: rework prog_digest into prog_tag
Commit 7bd509e311 ("bpf: add prog_digest and expose it via
fdinfo/netlink") was recently discussed, partially due to
admittedly suboptimal name of "prog_digest" in combination
with sha1 hash usage, thus inevitably and rightfully concerns
about its security in terms of collision resistance were
raised with regards to use-cases.

The intended use cases are for debugging resp. introspection
only for providing a stable "tag" over the instruction sequence
that both kernel and user space can calculate independently.
It's not usable at all for making a security relevant decision.
So collisions where two different instruction sequences generate
the same tag can happen, but ideally at a rather low rate. The
"tag" will be dumped in hex and is short enough to introspect
in tracepoints or kallsyms output along with other data such
as stack trace, etc. Thus, this patch performs a rename into
prog_tag and truncates the tag to a short output (64 bits) to
make it obvious it's not collision-free.

Should in future a hash or facility be needed with a security
relevant focus, then we can think about requirements, constraints,
etc that would fit to that situation. For now, rework the exposed
parts for the current use cases as long as nothing has been
released yet. Tested on x86_64 and s390x.

Fixes: 7bd509e311 ("bpf: add prog_digest and expose it via fdinfo/netlink")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-16 14:03:31 -05:00
..
Kbuild uapi: export tc_skbmod.h 2016-12-05 19:43:02 -05:00
tc_bpf.h bpf: rework prog_digest into prog_tag 2017-01-16 14:03:31 -05:00
tc_connmark.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_csum.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_defact.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_gact.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_ife.h net sched ife action: Introduce skb tcindex metadata encap decap 2016-09-19 21:55:28 -04:00
tc_ipt.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_mirred.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_nat.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_pedit.h sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
tc_skbedit.h skbedit: allow the user to specify bitmask for mark 2016-10-27 16:07:25 -04:00
tc_skbmod.h net_sched: Introduce skbmod action 2016-09-15 19:33:47 -04:00
tc_tunnel_key.h net/sched: act_tunnel_key: Add UDP dst port option 2016-11-09 13:41:55 -05:00
tc_vlan.h net/sched: act_vlan: Introduce TCA_VLAN_ACT_MODIFY vlan action 2016-09-22 01:34:20 -04:00