linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: KP Singh <kpsingh@chromium.org>
To: Martin KaFai Lau <kafai@fb.com>
Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Paul Turner <pjt@google.com>, Jann Horn <jannh@google.com>,
	Florent Revest <revest@chromium.org>
Subject: Re: [PATCH bpf-next v8 3/7] bpf: Generalize bpf_sk_storage
Date: Thu, 20 Aug 2020 00:19:44 +0200	[thread overview]
Message-ID: <a69e6bdf-7a1b-3152-f26b-20175451d9c2@chromium.org> (raw)
In-Reply-To: <20200819171215.lcgoon3fbm4kvkpc@kafai-mbp.dhcp.thefacebook.com>



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@google.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
> 

  reply	other threads:[~2020-08-19 22:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 16:46 [PATCH bpf-next v8 0/7] Generalizing bpf_local_storage KP Singh
2020-08-03 16:46 ` [PATCH bpf-next v8 1/7] A purely mechanical change to split the renaming from the actual generalization KP Singh
2020-08-17 23:56   ` Martin KaFai Lau
2020-08-18 14:30     ` KP Singh
2020-08-03 16:46 ` [PATCH bpf-next v8 2/7] bpf: Generalize caching for sk_storage KP Singh
2020-08-17 23:57   ` Martin KaFai Lau
2020-08-03 16:46 ` [PATCH bpf-next v8 3/7] bpf: Generalize bpf_sk_storage KP Singh
2020-08-18  1:05   ` Martin KaFai Lau
2020-08-19 12:41     ` KP Singh
2020-08-19 17:12       ` Martin KaFai Lau
2020-08-19 22:19         ` KP Singh [this message]
2020-08-03 16:46 ` [PATCH bpf-next v8 4/7] bpf: Split bpf_local_storage to bpf_sk_storage KP Singh
2020-08-03 16:46 ` [PATCH bpf-next v8 5/7] bpf: Implement bpf_local_storage for inodes KP Singh
2020-08-18  1:27   ` Martin KaFai Lau
2020-08-18 15:10     ` KP Singh
2020-08-18 15:23       ` Martin KaFai Lau
2020-08-18 15:33         ` KP Singh
2020-08-03 16:46 ` [PATCH bpf-next v8 6/7] bpf: Allow local storage to be used from LSM programs KP Singh
2020-08-18  4:16   ` Martin KaFai Lau
2020-08-19 13:01     ` KP Singh
2020-08-03 16:46 ` [PATCH bpf-next v8 7/7] bpf: Add selftests for local_storage KP Singh
2020-08-03 17:46 ` [PATCH bpf-next v8 0/7] Generalizing bpf_local_storage KP Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a69e6bdf-7a1b-3152-f26b-20175451d9c2@chromium.org \
    --to=kpsingh@chromium.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jannh@google.com \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=pjt@google.com \
    --cc=revest@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).