[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a69e6bdf-7a1b-3152-f26b-20175451d9c2@chromium.org>
Date: Thu, 20 Aug 2020 00:19:44 +0200
From: KP Singh <kpsingh@...omium.org>
To: Martin KaFai Lau <kafai@...com>
Cc: linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
linux-security-module@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Paul Turner <pjt@...gle.com>, Jann Horn <jannh@...gle.com>,
Florent Revest <revest@...omium.org>
Subject: Re: [PATCH bpf-next v8 3/7] bpf: Generalize bpf_sk_storage
On 19.08.20 19:12, Martin KaFai Lau wrote:
> On Wed, Aug 19, 2020 at 02:41:50PM +0200, KP Singh wrote:
>> On 8/18/20 3:05 AM, Martin KaFai Lau wrote:
>>> On Mon, Aug 03, 2020 at 06:46:51PM +0200, KP Singh wrote:
>>>> From: KP Singh <kpsingh@...gle.com>
>>>>
>>>> Refactor the functionality in bpf_sk_storage.c so that concept of
[...]
>>>> + struct bpf_local_storage_map *smap,
>>>> + struct bpf_local_storage_elem *first_selem);
>>>> +
>>>> +struct bpf_local_storage_data *
>>>> +bpf_local_storage_update(void *owner, struct bpf_map *map, void *value,
>>> Nit. It may be more consistent to take "struct bpf_local_storage_map *smap"
>>> instead of "struct bpf_map *map" here.
>>>
>>> bpf_local_storage_map_check_btf() will be the only one taking
>>> "struct bpf_map *map".
>>
>> That's because it is used in map operations as map_check_btf which expects
>> a bpf_map *map pointer. We can wrap it in another function but is that
>> worth doing?
> Agree. bpf_local_storage_map_check_btf() should stay as is.
>
> I meant to only change the "bpf_local_storage_update()" to take
> "struct bpf_local_storage_map *smap".
>
Apologies, I misread that. Updated.
- KP
up here
>> * or when the storage is freed e.g.
>> * by bpf_sk_storage_free() during __sk_destruct().
>>
> +1
>
Powered by blists - more mailing lists