[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQK_RTRT+DVPj8daBqJO-1neY9_efTMgbTL+kDnJ9VNAQQ@mail.gmail.com>
Date: Thu, 22 Aug 2024 11:43:15 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Gang Yan <gang_yan@...mail.com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Gang Yan <yangang@...inos.cn>,
Network Development <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Geliang Tang <geliang@...nel.org>
Subject: Re: [PATCH bpf-next] bpf: Allow error injection for update_socket_protocol
On Thu, Aug 22, 2024 at 8:33 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 22 Aug 2024 14:08:57 +0800 Gang Yan wrote:
> > diff --git a/net/socket.c b/net/socket.c
> > index fcbdd5bc47ac..63ce1caf75eb 100644
> > --- a/net/socket.c
> > +++ b/net/socket.c
> > @@ -1695,6 +1695,7 @@ __weak noinline int update_socket_protocol(int family, int type, int protocol)
> > {
> > return protocol;
> > }
> > +ALLOW_ERROR_INJECTION(update_socket_protocol, ERRNO);
>
> IDK if this falls under BPF or directly net, but could you explain
> what test will use this? I'd prefer not to add test hooks into the
> kernel unless they are exercised by in-tree tests.
This looks unnecessary.
update_socket_protocol is already registered as fmodret.
There is even selftest that excises this feature:
tools/testing/selftests/bpf/progs/mptcpify.c
It doesn't need to be part of the error-inject.
pw-bot: cr
Powered by blists - more mailing lists