[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEXv5_i6hsUqXWpb7xLuffxmosz8_KGueQfJD2K9VvT0tJbmGw@mail.gmail.com>
Date: Wed, 3 Sep 2025 19:49:03 -0400
From: David Windsor <dwindsor@...il.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Eduard <eddyz87@...il.com>,
Song Liu <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH 1/2] kernel/bpf: Add BPF_MAP_TYPE_CRED_STORAGE map type
and kfuncs
> cred is not something that needs fast access and automatic lifetime
management.
Use case is for eg KRSI to be able to track credential leakage.
Lifetime management absolutely helps there. Also, the use case is
"whatever the bpf-lsm maintainers had in mind in their presentation,"
right?
Also, this entire presentation says otherwise:
https://lpc.events/event/18/contributions/1940/attachments/1438/3389/kfuncs%20for%20BPF%20LSM%20Use%20Cases.v4.pdf
>From that:
"Still missing storage for following types:
struct file
struct cred
struct ipc
struct msg_msg
struct superblock"
> Technically it's doable, but sorry not going to.
Sweet I'll do it
On Wed, Sep 3, 2025 at 7:30 PM Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
>
> On Wed, Sep 3, 2025 at 10:58 AM David Windsor <dwindsor@...il.com> wrote:
> >
> > All other bpf local storage is obtained using helpers which benefit from
> > RET_PTR_TO_MAP_VALUE_OR_NULL, so can return void * pointers directly to
> > map values. kfuncs don't have that, so return struct
> > bpf_local_storage_data * and access map values through sdata->data.
>
> The commit log tells nothing about motivation for such "cred local storage".
> Technically it's doable, but sorry not going to.
> cred is not something that needs fast access and automatic lifetime
> management. Use hash map with 'struct cred *' as a key.
>
> pw-bot: cr
Powered by blists - more mailing lists