lkml.org 
[lkml]   [2020]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH bpf-next v8 6/7] bpf: Allow local storage to be used from LSM programs
From
Date


On 8/18/20 6:16 AM, Martin KaFai Lau wrote:
> On Mon, Aug 03, 2020 at 06:46:54PM +0200, KP Singh wrote:
>> From: KP Singh <kpsingh@google.com>
>>
>> Adds support for both bpf_{sk, inode}_storage_{get, delete} to be used
>> in LSM programs. These helpers are not used for tracing programs

[...]

>> @@ -2823,6 +2823,10 @@ union bpf_attr {
>> * "type". The bpf-local-storage "type" (i.e. the *map*) is
>> * searched against all bpf-local-storages residing at *sk*.
>> *
>> + * For socket programs, *sk* should be a **struct bpf_sock** pointer
>> + * and an **ARG_PTR_TO_BTF_ID** of type **struct sock** for LSM
>> + * programs.
> I found it a little vague on what "socket programs" is. May be:
>
> *sk* is a kernel **struct sock** pointer for LSM program.
> *sk* is a **struct bpf_sock** pointer for other program types.

This is better, Thanks!

- KP

>
> Others LGTM
>
> Acked-by: Martin KaFai Lau <kafai@fb.com>
>

\
 
 \ /
  Last update: 2020-08-19 15:05    [W:0.054 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site