exynos-linux-stable/net/sched
Daniel Borkmann de760e6d03
bpf: rework prog_digest into prog_tag
Commit 7bd509e311f4 ("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: 7bd509e311f4 ("bpf: add prog_digest and expose it via fdinfo/netlink")
Change-Id: Iea6eb91ea03d6488cc3bbf662f5e301015f3433d
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>
2024-09-25 16:54:38 +03:00
..
act_api.c net: avoid potential infinite loop in tc_ctl_action() 2019-10-29 09:15:12 +01:00
act_bpf.c bpf: rework prog_digest into prog_tag 2024-09-25 16:54:38 +03:00
act_connmark.c act_connmark: avoid crashing on malformed nlattrs with null parms 2017-03-22 12:43:34 +01:00
act_csum.c sched: act_csum: don't mangle TCP and UDP GSO packets 2018-03-22 09:17:42 +01:00
act_gact.c net/sched: Fix update of lastuse in act modules implementing stats_update 2018-01-17 09:38:54 +01:00
act_ife.c ife: error out when nla attributes are empty 2019-08-11 12:22:18 +02:00
act_ipt.c net: sched: fix NULL pointer dereference when action calls some targets 2017-08-30 10:21:42 +02:00
act_meta_mark.c Support to encoding decoding skb mark on IFE action 2016-03-01 17:15:23 -05:00
act_meta_skbprio.c Support to encoding decoding skb prio on IFE action 2016-03-01 17:15:23 -05:00
act_meta_skbtcindex.c net sched ife action: Introduce skb tcindex metadata encap decap 2016-09-19 21:55:28 -04:00
act_mirred.c Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
act_nat.c net_sched: move tc_action into tcf_common 2016-07-25 21:49:19 -07:00
act_pedit.c net/sched: act_pedit: fix WARN() in the traffic path 2019-11-28 18:28:04 +01:00
act_police.c net sched: stylistic cleanups 2016-09-19 22:04:14 -04:00
act_simple.c net/sched: act_simple: fix parsing of TCA_DEF_DATA 2018-06-26 08:08:06 +08:00
act_skbedit.c net_sched: move tc_action into tcf_common 2016-07-25 21:49:19 -07:00
act_skbmod.c net/sched: fix NULL dereference on the error path of tcf_skbmod_init() 2018-04-13 19:48:35 +02:00
act_tunnel_key.c net/sched: act_tunnel_key: fix NULL dereference when 'goto chain' is used 2018-08-24 13:12:37 +02:00
act_vlan.c net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions 2016-10-03 21:40:50 -04:00
cls_api.c net, sched: fix soft lockup in tc_classify 2017-01-15 13:42:53 +01:00
cls_basic.c net, sched: respect rcu grace period on cls destruction 2016-11-28 10:47:35 -05:00
cls_bpf.c bpf: rework prog_digest into prog_tag 2024-09-25 16:54:38 +03:00
cls_cgroup.c net, sched: respect rcu grace period on cls destruction 2016-11-28 10:47:35 -05:00
cls_flow.c net, sched: respect rcu grace period on cls destruction 2016-11-28 10:47:35 -05:00
cls_flower.c net: sched: correct flower port blocking 2020-03-11 07:53:05 +01:00
cls_fw.c net sched: stylistic cleanups 2016-09-19 22:04:14 -04:00
cls_matchall.c net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS 2020-02-28 15:42:44 +01:00
cls_route.c net_sched: cls_route: remove the right filter from hashtable 2020-04-02 17:20:29 +02:00
cls_rsvp.c
cls_rsvp.h cls_rsvp: fix rsvp_policy 2020-02-14 16:30:58 -05:00
cls_rsvp6.c
cls_tcindex.c net_sched: keep alloc_hash updated after hash allocation 2020-04-02 17:20:30 +02:00
cls_u32.c net: sched: Fix memory exposure from short TCA_U32_SEL 2018-09-15 09:42:55 +02:00
em_canid.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_cmp.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
em_ipset.c netfilter: x_tables: Pass struct net in xt_action_param 2015-09-18 21:58:14 +02:00
em_meta.c UPSTREAM: sched/headers: Prepare for new header dependencies before moving code to <linux/sched/loadavg.h> 2019-03-22 14:07:14 -07:00
em_nbyte.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_text.c net: Remove state argument from skb_find_text() 2015-02-22 15:59:54 -05:00
em_u32.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
ematch.c net_sched: ematch: reject invalid TCF_EM_SIMPLE 2020-02-05 13:05:42 +00:00
Kconfig net sched ife action: Introduce skb tcindex metadata encap decap 2016-09-19 21:55:28 -04:00
Makefile net sched ife action: Introduce skb tcindex metadata encap decap 2016-09-19 21:55:28 -04:00
sch_api.c Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
sch_atm.c net_sched: drop packets after root qdisc lock is released 2016-06-25 12:19:35 -04:00
sch_blackhole.c net_sched: blackhole: tell upper qdisc about dropped packets 2018-07-22 14:27:36 +02:00
sch_cbq.c sch_cbq: validate TCA_CBQ_WRROPT to avoid crash 2019-10-07 18:53:24 +02:00
sch_choke.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
sch_codel.c net: sched: Fix a possible null-pointer dereference in dequeue_func() 2019-08-11 12:22:17 +02:00
sch_drr.c net_sched: drop packets after root qdisc lock is released 2016-06-25 12:19:35 -04:00
sch_dsmark.c sch_dsmark: fix potential NULL deref in dsmark_init() 2019-10-07 18:53:23 +02:00
sch_fifo.c sched: don't use skb queue helpers 2016-09-19 01:47:18 -04:00
sch_fq.c net: fq: add missing attribute validation for orphan mask 2020-03-20 09:07:40 +01:00
sch_fq_codel.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
sch_generic.c net_sched: let qdisc_put() accept NULL pointer 2019-09-21 07:14:23 +02:00
sch_gred.c net: sched: gred: pass the right attribute to gred_change_table_def() 2018-11-10 07:42:58 -08:00
sch_hfsc.c net/sched/sch_hfsc.c: remove unused cl_myfadj 2016-08-08 16:06:47 -07:00
sch_hhf.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
sch_htb.c sch_htb: fix crash on init failure 2018-09-15 09:43:02 +02:00
sch_ingress.c net: sched: fix tc_should_offload for specific clsact classes 2016-06-07 16:59:53 -07:00
sch_mq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:35:30 +01:00
sch_mqprio.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:35:30 +01:00
sch_multiq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:35:30 +01:00
sch_netem.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
sch_pie.c sched: replace __skb_dequeue with __qdisc_dequeue_head 2016-09-19 01:47:18 -04:00
sch_plug.c net_sched: drop packets after root qdisc lock is released 2016-06-25 12:19:35 -04:00
sch_prio.c Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
sch_qfq.c sch_qfq: keep backlog updated with qlen 2016-09-23 06:52:31 -04:00
sch_red.c net_sched: red: Avoid illegal values 2018-02-25 11:05:48 +01:00
sch_sfb.c net/flow_dissector: switch to siphash 2019-11-10 11:23:31 +01:00
sch_sfq.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
sch_tbf.c net: create skb_gso_validate_mac_len() 2019-02-20 10:18:28 +01:00
sch_teql.c net_sched: drop packets after root qdisc lock is released 2016-06-25 12:19:35 -04:00