netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Gang Yan <gang_yan@foxmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Gang Yan <yangang@kylinos.cn>,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	Geliang Tang <geliang@kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Allow error injection for update_socket_protocol
Date: Thu, 22 Aug 2024 08:29:35 -0700	[thread overview]
Message-ID: <20240822082935.1ac2b305@kernel.org> (raw)
In-Reply-To: <tencent_1E619C9E44C8C4B2B713A0D6DD45B92BF70A@qq.com>

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.

  reply	other threads:[~2024-08-22 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  6:08 [PATCH bpf-next] bpf: Allow error injection for update_socket_protocol Gang Yan
2024-08-22 15:29 ` Jakub Kicinski [this message]
2024-08-22 18:43   ` Alexei Starovoitov
     [not found] <tmcxv429u9-tmgrokbfbm@nsmail7.0.0--kylin--1>
2024-08-26  3:29 ` Gang Yan
2024-08-26  4:05   ` Yonghong Song
2025-04-09  9:17     ` Geliang Tang
2025-04-11 18:06       ` 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=20240822082935.1ac2b305@kernel.org \
    --to=kuba@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gang_yan@foxmail.com \
    --cc=geliang@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yangang@kylinos.cn \
    /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).