lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABx7vpWv7+q6zhPF_3acKGgThrzs+6r4=PtqJFndfWie8miOWg@mail.gmail.com>
Date: Thu, 10 Apr 2025 16:49:13 -0700
From: Martin KaFai Lau <iamkafai@...il.com>
To: Amery Hung <ameryhung@...il.com>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, alexei.starovoitov@...il.com, 
	andrii@...nel.org, daniel@...earbox.net, edumazet@...gle.com, kuba@...nel.org, 
	xiyou.wangcong@...il.com, jhs@...atatu.com, martin.lau@...nel.org, 
	jiri@...nulli.us, stfomichev@...il.com, toke@...hat.com, sinquersw@...il.com, 
	ekarani.silvestre@....ufcg.edu.br, yangpeihao@...u.edu.cn, 
	yepeilin.cs@...il.com, kernel-team@...a.com
Subject: Re: [PATCH bpf-next v7 02/10] bpf: net_sched: Support implementation
 of Qdisc_ops in bpf

On Wed, Apr 9, 2025 at 2:47 PM Amery Hung <ameryhung@...il.com> wrote:
> +static int bpf_qdisc_sk_buff_access(struct bpf_verifier_log *log,
> +                                   const struct bpf_reg_state *reg,
> +                                   int off, size_t *end)
> +{
> +       switch (off) {
> +       case offsetof(struct sk_buff, tstamp):
> +               *end = offsetofend(struct sk_buff, tstamp);
> +               break;
> +       case offsetof(struct sk_buff, priority):
> +               *end = offsetofend(struct sk_buff, priority);
> +               break;
> +       case offsetof(struct sk_buff, mark):
> +               *end = offsetofend(struct sk_buff, mark);
> +               break;
> +       case offsetof(struct sk_buff, queue_mapping):
> +               *end = offsetofend(struct sk_buff, queue_mapping);
> +               break;
> +       case offsetof(struct sk_buff, cb) + offsetof(struct qdisc_skb_cb, tc_classid):
> +               *end = offsetof(struct sk_buff, cb) +
> +                      offsetofend(struct qdisc_skb_cb, tc_classid);
> +               break;
> +       case offsetof(struct sk_buff, cb) + offsetof(struct qdisc_skb_cb, data[0]) ...
> +            offsetof(struct sk_buff, cb) + offsetof(struct qdisc_skb_cb,
> +                                                    data[QDISC_CB_PRIV_LEN - 1]):
> +               *end = offsetof(struct sk_buff, cb) +
> +                      offsetofend(struct qdisc_skb_cb, data[QDISC_CB_PRIV_LEN - 1]);
> +               break;
> +       case offsetof(struct sk_buff, tc_index):
> +               *end = offsetofend(struct sk_buff, tc_index);
> +               break;

I only kept the WRITE access to tstamp and data[]. Removed everything
else. It can be revisited when they are really needed in the future.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ