The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: "H . Peter Anvin" <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	rostedt <rostedt@goodmis.org>, Olivier Dion <odion@efficios.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Jiri Kosina <jkosina@suse.cz>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: Official documentation from Intel stating that poking INT3 (single-byte) concurrently is OK ?
Date: Tue, 21 Feb 2023 11:44:42 -0500	[thread overview]
Message-ID: <786f4aed-2c30-806b-409b-23a60b3d7571@efficios.com> (raw)

Hi Peter,

I have emails from you dating from a few years back unofficially stating
that it's OK to update the first byte of an instruction with a single-byte
int3 concurrently:

https://lkml.indiana.edu/hypermail/linux/kernel/1001.1/01530.html

It is referred in the original implementation of text_poke_bp():
commit fd4363fff3d9 ("x86: Introduce int3 (breakpoint)-based instruction patching")

Olivier Dion is working on the libpatch [1,2] project aiming to use this
property for low-latency/low-overhead live code patching in user-space as
well, but we cannot find an official statement from Intel that guarantees
this breakpoint-bypass technique is indeed OK without stopping the world
while patching.

Do you know where I could find an official statement of this guarantee ?

Thanks!

Mathieu

[1] https://www.dorsal.polymtl.ca/files/may2022/odion_may2022_libpatch_binary_patcher.pdf
[2] https://git.sr.ht/~old/libpatch

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

             reply	other threads:[~2023-02-21 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 16:44 Mathieu Desnoyers [this message]
2023-02-21 17:50 ` Official documentation from Intel stating that poking INT3 (single-byte) concurrently is OK ? Steven Rostedt
2023-02-21 18:42   ` Mathieu Desnoyers
2023-02-22  9:20     ` Peter Zijlstra
2023-02-22 16:41       ` Mathieu Desnoyers

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=786f4aed-2c30-806b-409b-23a60b3d7571@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=odion@efficios.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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