From: John Fastabend <john.fastabend@gmail.com>
To: Victor Stewart <v@nametag.social>, bpf <bpf@vger.kernel.org>,
Vadim Fedorenko <vadfed@meta.com>
Subject: Re: [RFC bpf-next] crypto for unsleepable progs + new persistent bpf map for kernel api structs
Date: Mon, 15 Jan 2024 15:21:06 -0800 [thread overview]
Message-ID: <65a5bde2c4e31_2eaef20845@john.notmuch> (raw)
In-Reply-To: <CAM1kxwi9FMUr3vOqZeRe3FjuvwQgdW-8g0HGLL5fU2tOOjRfYA@mail.gmail.com>
Victor Stewart wrote:
> On Sat, Jan 13, 2024 at 2:31 PM Victor Stewart <v@nametag.social> wrote:
> >
> > i was just brainstorming at Vadim off mailing list about my desire to do AES
> > decryption of QUIC connection IDs in an XDP program, RE his pending
> > bpf crypto api patch series:
> >
> > https://lore.kernel.org/bpf/20231202010604.1877561-1-vadfed@meta.com/
> >
> > i'm hoping to gather some thoughts on the below two roadblocks:
> >
> >
> > (1) crypto for preemption disabled bpf programs
> >
> > as he mentioned in the comments of 1/3 and to me directly, a non sleepable
> > bpf program is not allowed to allocate a crypto context.
> >
> > is it possible for this restriction to be lifted?
> >
> > if not what safeguards would be required to lift it?
> >
> > worst case maybe an API could be added for userspace to initialize the
> > context, as userspace must provide the key anyway.
I'm trying to understand why this is "worst case" to setup the context
from userspace? Perhaps naively I haven't tried to code this up, but
it seems like a sensible workflow to have userspace generate the key and
also setup the context. Then have fastpath (XDP) use the context for
decrypting?
Thanks,
John
next prev parent reply other threads:[~2024-01-15 23:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 19:31 [RFC bpf-next] crypto for unsleepable progs + new persistent bpf map for kernel api structs Victor Stewart
2024-01-13 21:15 ` Victor Stewart
2024-01-15 23:21 ` John Fastabend [this message]
2024-01-16 17:45 ` Victor Stewart
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=65a5bde2c4e31_2eaef20845@john.notmuch \
--to=john.fastabend@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=v@nametag.social \
--cc=vadfed@meta.com \
/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