From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Brian Gerst <brgerst@gmail.com>, Juergen Gross <jgross@suse.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/alternatives] x86/alternatives: Document the text_poke_bp_batch() synchronization rules a bit more
Date: Tue, 25 Mar 2025 11:36:39 -0000 [thread overview]
Message-ID: <174290260003.14745.15724435557527848007.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250325103047.GH36322@noisy.programming.kicks-ass.net>
The following commit has been merged into the x86/alternatives branch of tip:
Commit-ID: 451283cd40bceccc02397d0e5b2b6eda6047b1ed
Gitweb: https://git.kernel.org/tip/451283cd40bceccc02397d0e5b2b6eda6047b1ed
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Tue, 25 Mar 2025 11:30:47 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 25 Mar 2025 12:28:35 +01:00
x86/alternatives: Document the text_poke_bp_batch() synchronization rules a bit more
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20250325103047.GH36322@noisy.programming.kicks-ass.net
---
arch/x86/kernel/alternative.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 85089c7..5f44814 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -2751,6 +2751,13 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
/*
* Remove and wait for refs to be zero.
+ *
+ * Notably, if after step-3 above the INT3 got removed, then the
+ * text_poke_sync() will have serialized against any running INT3
+ * handlers and the below spin-wait will not happen.
+ *
+ * IOW. unless the replacement instruction is INT3, this case goes
+ * unused.
*/
for_each_possible_cpu(i) {
atomic_t *refs = per_cpu_ptr(&bp_refs, i);
next prev parent reply other threads:[~2025-03-25 11:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 7:25 [PATCH] x86/alternatives: remove false sharing in poke_int3_handler() Eric Dumazet
2025-03-23 21:38 ` Ingo Molnar
2025-03-24 3:59 ` Eric Dumazet
2025-03-24 7:16 ` Ingo Molnar
2025-03-24 7:47 ` Eric Dumazet
2025-03-24 7:53 ` Eric Dumazet
2025-03-24 8:04 ` Ingo Molnar
2025-03-24 11:33 ` Peter Zijlstra
2025-03-25 8:41 ` Ingo Molnar
2025-03-25 10:30 ` Peter Zijlstra
2025-03-25 11:26 ` Ingo Molnar
2025-03-25 12:31 ` Peter Zijlstra
2025-03-27 20:56 ` Ingo Molnar
2025-03-25 11:36 ` tip-bot2 for Peter Zijlstra [this message]
2025-03-24 8:02 ` Ingo Molnar
2025-03-24 8:20 ` Eric Dumazet
2025-04-11 5:40 [PATCH 02/53] x86/alternatives: Document the text_poke_bp_batch() synchronization rules a bit more Ingo Molnar
2025-04-11 10:02 ` [tip: x86/alternatives] " tip-bot2 for Peter Zijlstra
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=174290260003.14745.15724435557527848007.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=brgerst@gmail.com \
--cc=edumazet@google.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@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
all inboxes | Powered by JetHome®