Re: [External] Re: [PATCH bpf-next] bpf: update docs on CONFIG_FUNCTION_ERROR_INJECTION

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2024-10-10 at 12:06 -0700, Alexei Starovoitov wrote:
> On Thu, Oct 10, 2024 at 11:57 AM Martin Kelly
> <martin.kelly@xxxxxxxxxxxxxxx> wrote:
> > 
> > On Thu, 2024-10-10 at 11:54 -0700, Alexei Starovoitov wrote:
> > > On Thu, Oct 10, 2024 at 11:47 AM Martin Kelly
> > > <martin.kelly@xxxxxxxxxxxxxxx> wrote:
> > > > 
> > > > The documentation says CONFIG_FUNCTION_ERROR_INJECTION is
> > > > supported
> > > > only
> > > > on x86. This was presumably true at the time of writing, but
> > > > it's
> > > > now
> > > > supported on many other architectures too, so drop the part of
> > > > the
> > > > statement mentioning x86.
> > > > 
> > > > Signed-off-by: Martin Kelly <martin.kelly@xxxxxxxxxxxxxxx>
> > > > ---
> > > >  include/uapi/linux/bpf.h       | 3 +--
> > > >  tools/include/uapi/linux/bpf.h | 3 +--
> > > >  2 files changed, 2 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/include/uapi/linux/bpf.h
> > > > b/include/uapi/linux/bpf.h
> > > > index 8ab4d8184b9d..a2ddfc8c8ed9 100644
> > > > --- a/include/uapi/linux/bpf.h
> > > > +++ b/include/uapi/linux/bpf.h
> > > > @@ -3105,8 +3105,7 @@ union bpf_attr {
> > > >   *             **ALLOW_ERROR_INJECTION** in the kernel code.
> > > >   *
> > > >   *             Also, the helper is only available for the
> > > > architectures having
> > > > - *             the CONFIG_FUNCTION_ERROR_INJECTION option. As
> > > > of
> > > > this writing,
> > > > - *             x86 architecture is the only one to support
> > > > this
> > > > feature.
> > > > + *             the CONFIG_FUNCTION_ERROR_INJECTION option.
> > > 
> > > Something like this is good to add to
> > > Documentation/fault-injection/fault-injection.rst
> > > and may be a link to it somewhere in Documentation/bpf/.
> > > 
> > > But uapi/bpf.h is not such place.
> > > 
> > > pw-bot: cr
> > 
> > Would you prefer to just remove the sentence altogether? Currently,
> > this statement is already in the headers, so I think it's best to
> > either correct it or remove it, but not leave it the way it is
> > (which
> > is not very accurate).
> 
> I say let's remove the whole paragraph then.
> 
> .h already says
> "It is only available if the kernel was compiled
>  with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration
>  option,"
> 
> which in turn depends on:
> 
> config BPF_KPROBE_OVERRIDE
>         bool "Enable BPF programs to override a kprobed function"
>         depends on BPF_EVENTS
>         depends on FUNCTION_ERROR_INJECTION
> 
> No need to duplicate kconfig dependencies as a doc in .h

Agreed. I sent a v2 with the paragraph removed.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux