Linux-Next discussions
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>, bpf <bpf@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the bpf-next tree with the bpf tree
Date: Fri, 27 Nov 2026 15:55:12 +0000	[thread overview]
Message-ID: <awmn4OTEiDdqyi6t@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2847 bytes --]

Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  kernel/bpf/fixups.c

between commit:

  1879b5e505de9 ("bpf: Emit nospec after calls and atomics that write to the stack")

from the bpf tree and commit:

  57fae4059380a ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 7.4-rc1")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc kernel/bpf/fixups.c
index 8c3a17a05a4e1,7af8cb886f7d4..0000000000000
--- a/kernel/bpf/fixups.c
+++ b/kernel/bpf/fixups.c
@@@ -907,14 -1261,11 +1261,12 @@@ int bpf_convert_ctx_accesses(struct bpf
  {
  	struct bpf_subprog_info *subprogs = env->subprog_info;
  	const struct bpf_verifier_ops *ops = env->ops;
- 	int i, cnt, size, ctx_field_size, ret, delta = 0, epilogue_cnt = 0;
- 	const int insn_cnt = env->prog->len;
+ 	int i, cnt, size, ctx_field_size, ret, epilogue_cnt = 0, first = 0;
  	struct bpf_insn *epilogue_buf = env->epilogue_buf;
  	struct bpf_insn *insn_buf = env->insn_buf;
 +	bool nospec, nospec_next = false;
  	struct bpf_insn *insn;
  	u32 target_size, size_default, off;
- 	struct bpf_prog *new_prog;
  	enum bpf_access_type type;
  	bool is_narrower_load;
  	int epilogue_idx = 0;
@@@ -995,13 -1336,10 +1337,15 @@@
  		enum bpf_reg_type ptr_type;
  		u8 mode;
  
+ 		insn = &env->prog->insnsi[i];
+ 
 -		if (env->insn_aux_data[i].nospec) {
 -			WARN_ON_ONCE(env->insn_aux_data[i].alu_state);
 +		/* A call or an atomic gets its nospec in front of the next insn */
- 		nospec = env->insn_aux_data[i + delta].nospec;
- 		WARN_ON_ONCE(nospec && env->insn_aux_data[i + delta].alu_state);
++		nospec = env->insn_aux_data[i].nospec;
++		WARN_ON_ONCE(nospec && env->insn_aux_data[i].alu_state);
 +		nospec |= nospec_next;
- 		nospec_next = env->insn_aux_data[i + delta].nospec_result;
++		nospec_next = env->insn_aux_data[i].nospec_result;
 +
 +		if (nospec) {
  			struct bpf_insn *patch = insn_buf;
  
  			*patch++ = BPF_ST_NOSPEC();
@@@ -1101,14 -1423,9 +1429,10 @@@
  			*patch++ = *insn;
  			*patch++ = BPF_ST_NOSPEC();
  			cnt = patch - insn_buf;
- 			new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt);
- 			if (!new_prog)
- 				return -ENOMEM;
- 
- 			delta    += cnt - 1;
- 			env->prog = new_prog;
- 			insn      = new_prog->insnsi + i + delta;
+ 			insn = bpf_patch_list_add(env, i, insn_buf, cnt);
+ 			if (IS_ERR(insn))
+ 				return PTR_ERR(insn);
 +			nospec_next = false;
  			continue;
  		}
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-11-27 15:55 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 15:55 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-27 15:55 linux-next: manual merge of the bpf-next tree with the bpf tree Mark Brown
2026-11-26 14:42 Mark Brown
2026-11-17 21:39 Mark Brown
2026-11-17 21:36 Mark Brown
2026-11-18 15:47 ` J4f J4f
2026-11-19  1:17   ` Alexei Starovoitov
2026-11-03 14:08 Mark Brown
2026-11-03 17:40 ` Alexei Starovoitov
2026-11-03 17:50   ` Mark Brown
2026-09-29 14:56 Mark Brown
2026-09-29 16:31 ` Alexei Starovoitov
2026-09-30  7:07 ` Jiri Olsa
2026-09-29 12:15 Mark Brown
2026-09-24 12:39 Mark Brown
2026-09-24 16:12 ` Ihor Solodrai
2026-09-24 16:22   ` Alexei Starovoitov
2026-09-22 10:05 Mark Brown
2026-09-21  9:49 Mark Brown
2026-09-21 12:12 ` Daniel Borkmann
2026-09-18 11:05 Mark Brown
2026-09-14 11:31 Mark Brown
2026-09-14 11:34 ` Daniel Borkmann
2026-09-03 14:10 Mark Brown
2026-09-06 23:18 ` Alexei Starovoitov
2026-04-01 12:29 Mark Brown
2026-04-01 15:27 ` Alexei Starovoitov
2026-02-24 12:39 Mark Brown
2026-02-24 16:22 ` Alexei Starovoitov
2025-11-06  0:35 Stephen Rothwell
2025-11-06 17:57 ` Andrii Nakryiko
2025-02-14  5:07 Stephen Rothwell
2025-02-14  5:33 ` Alexei Starovoitov
2025-02-14  5:40   ` Stephen Rothwell
2025-02-14  9:12   ` Jiri Olsa
2025-02-14 18:50     ` Alexei Starovoitov
2024-03-07  1:40 Stephen Rothwell
2023-03-06 22:58 Stephen Rothwell
2023-03-10  0:38 ` Stephen Rothwell
2023-03-10  3:18 ` Bagas Sanjaya
2022-11-21  1:27 Stephen Rothwell
2022-08-26  1:46 Stephen Rothwell
2022-08-25  0:50 Stephen Rothwell
2022-08-22  1:01 Stephen Rothwell
2021-12-05 23:39 Stephen Rothwell
2020-09-30  4:07 Stephen Rothwell
2020-10-02  3:59 ` Stephen Rothwell
2020-06-26  0:05 Stephen Rothwell
2020-07-06  1:43 ` Stephen Rothwell
2020-05-15  3:18 Stephen Rothwell
2019-10-08 22:47 Stephen Rothwell
2019-10-15 23:29 ` Stephen Rothwell
2019-10-07 22:48 Stephen Rothwell
2019-10-15 23:27 ` Stephen Rothwell
2019-04-17  1:08 Stephen Rothwell
2019-04-24  3:12 ` Stephen Rothwell
2018-12-04  1:09 Stephen Rothwell
2018-12-04  1:05 Stephen Rothwell
2018-11-12  0:54 Stephen Rothwell
2018-05-14  1:57 Stephen Rothwell
2018-05-14 20:41 ` Jakub Kicinski
2018-05-14 21:57   ` Stephen Rothwell
2018-05-02  2:09 Stephen Rothwell
2018-05-02  4:40 ` Song Liu
2018-05-02  5:50   ` Stephen Rothwell
2018-05-02  6:05     ` Song Liu
2018-04-26  0:53 Stephen Rothwell
2018-04-26  7:57 ` Daniel Borkmann
2018-02-26  0:41 Stephen Rothwell
2018-02-26  9:03 ` Daniel Borkmann
2018-02-26 23:28 ` Stephen Rothwell

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=awmn4OTEiDdqyi6t@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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