[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQLRhdLkZB8wFybofC8P8AP9sruMHzaYJbB4zUAKAv87dA@mail.gmail.com>
Date: Wed, 3 Sep 2025 16:29:57 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: David Windsor <dwindsor@...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
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