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]
Date:   Tue, 28 Feb 2023 09:58:13 +0100
From:   Wenjia Zhang <wenjia@...ux.ibm.com>
To:     "D. Wythe" <alibuda@...ux.alibaba.com>, kgraul@...ux.ibm.com,
        jaka@...ux.ibm.com, ast@...nel.org, daniel@...earbox.net,
        andrii@...nel.org
Cc:     kuba@...nel.org, davem@...emloft.net, netdev@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-rdma@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 1/2] net/smc: Introduce BPF injection
 capability for SMC



On 28.02.23 09:50, D. Wythe wrote:
> 
> 
> On 2/27/23 3:58 PM, Wenjia Zhang wrote:
>>
>>
>> On 21.02.23 13:18, D. Wythe wrote:
>>> From: "D. Wythe" <alibuda@...ux.alibaba.com>
>>>
>>> This PATCH attempts to introduce BPF injection capability for SMC.
>>> As we all know that the SMC protocol is not suitable for all scenarios,
>>> especially for short-lived. However, for most applications, they cannot
>>> guarantee that there are no such scenarios at all. Therefore, apps
>>> may need some specific strategies to decide shall we need to use SMC
>>> or not, for example, apps can limit the scope of the SMC to a specific
>>> IP address or port.
> 
> ...
> 
>>> +static int bpf_smc_passive_sk_ops_check_member(const struct btf_type 
>>> *t,
>>> +                           const struct btf_member *member,
>>> +                           const struct bpf_prog *prog)
>>> +{
>>> +    return 0;
>>> +}
>>
>> Please check the right pointer type of check_member:
>>
>> int (*check_member)(const struct btf_type *t,
>>              const struct btf_member *member);
>>
> 
> Hi Wenjia,
> 
> That's weird. the prototype of check_member on
> latested net-next and bpf-next is:
> 
> struct bpf_struct_ops {
>      const struct bpf_verifier_ops *verifier_ops;
>      int (*init)(struct btf *btf);
>      int (*check_member)(const struct btf_type *t,
>                  const struct btf_member *member,
>                  const struct bpf_prog *prog);
>      int (*init_member)(const struct btf_type *t,
>                 const struct btf_member *member,
>                 void *kdata, const void *udata);
>      int (*reg)(void *kdata);
>      void (*unreg)(void *kdata);
>      const struct btf_type *type;
>      const struct btf_type *value_type;
>      const char *name;
>      struct btf_func_model func_models[BPF_STRUCT_OPS_MAX_NR_MEMBERS];
>      u32 type_id;
>      u32 value_id;
> };
> 
> I wonder if there is any code out of sync?
> 
> And also I found that this patch is too complex and mixed with the code 
> of two modules (smc & bpf).
> I will split them out for easier review today.
> 
> Best wishes
> D. Wythe
> 

Good question, the base I used is the current torvalds tree, maybe some 
code there is still not up-to-date.

But it would be great if you can split them out for better review.

Thanks
Wenjia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ