All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenny Ho <y2kenny@gmail.com>
To: Yonghong Song <yhs@fb.com>
Cc: "Martin KaFai Lau" <kafai@fb.com>, bpf <bpf@vger.kernel.org>,
	"Andrii Nakryiko" <andriin@fb.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: Headers for whitelisted kernel functions available to BPF programs
Date: Tue, 8 Jun 2021 15:51:22 -0400	[thread overview]
Message-ID: <CAOWid-eXi36N7-qPHT0Or9v5OBbhYx6J5rX3uVbVQWJs_90LOg@mail.gmail.com> (raw)
In-Reply-To: <CAOWid-f_UivcZ1zW5qjPJ=0wD1NM+s+S9qT6nZuvtpv0o+NMxw@mail.gmail.com>

On Fri, Jun 4, 2021 at 4:47 PM Kenny Ho <y2kenny@gmail.com> wrote:
>
> On Fri, Jun 4, 2021 at 12:11 PM Yonghong Song <yhs@fb.com> wrote:
> > On 6/3/21 11:13 PM, Martin KaFai Lau wrote:
> > >
> > > Making the kfunc call whitelist more accessible is useful in general.
> > > The bpf tcp-cc struct_ops is the only prog type supporting kfunc call.
> > > What is your use case to introspect this whitelist?
> >
> > Agree. It would be good if you can share your use case.
>
> At the high level, I am trying to see if we can use bpf in the drm
> subsystem and gpu drivers which are kernel modules.  My initial
> motivation was to use bpf for dynamic/run-time reconfiguration of the
> drm/gpu driver (for experimentation.)  But now that I learned more
> about bpf, I think there are quite a few more things I can do with it.
> (Debugging during GPU hw bring-ups, profiling driver performance in
> live system, etc.)  I have been looking into bpf with kprobe and
> struct_ops.
>
> In terms of kernel module support for bpf/btf, Andrii told me about it
> last year and I see that his feature is in (I was able to do a btf
> dump file for /sys/kernel/btf/amdgpu, /sys/kernel/btf/drm_ttm_helper,
> for example.)  The next thing I thought about was having helper
> functions from kernel modules and Toke pointed me to Martin's patch
> around "unstable helpers"/calling whitelisted kernel functions and
> this is where we are at.

Yonghong and Martin, does the use case make sense?  Or am I trying to
do something stupid?

Kenny

  reply	other threads:[~2021-06-08 19:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 18:01 Headers for whitelisted kernel functions available to BPF programs Kenny Ho
2021-06-04  6:13 ` Martin KaFai Lau
2021-06-04 16:10   ` Yonghong Song
2021-06-04 20:47     ` Kenny Ho
2021-06-08 19:51       ` Kenny Ho [this message]
2021-06-09  6:41         ` Yonghong Song
2021-06-15 19:34           ` Kenny Ho
2021-06-16 16:28             ` Yonghong Song

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=CAOWid-eXi36N7-qPHT0Or9v5OBbhYx6J5rX3uVbVQWJs_90LOg@mail.gmail.com \
    --to=y2kenny@gmail.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=kafai@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.