From: Peter Zijlstra <peterz@infradead.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Nadav Amit <nadav.amit@gmail.com>,
Andi Kleen <ak@linux.intel.com>, Ingo Molnar <mingo@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Edward Cree <ecree@solarflare.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Borislav Petkov <bp@alien8.de>,
David Woodhouse <dwmw@amazon.co.uk>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
songliubraving@fb.com
Subject: Re: Tracing text poke / kernel self-modifying code (Was: Re: [RFC v2 0/6] x86: dynamic indirect branch promotion)
Date: Thu, 29 Aug 2019 13:46:02 +0200 [thread overview]
Message-ID: <20190829114602.GR2369@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <d37f678f-cf1d-5c98-228f-05bed99f2112@intel.com>
On Thu, Aug 29, 2019 at 12:40:56PM +0300, Adrian Hunter wrote:
> Can you expand on "and ensure the poke_handler preserves the existing
> control flow"? Whatever the INT3-handler does will be traced normally so
> long as it does not itself execute self-modified code.
My thinking was that the code shouldn't change semantics before emitting
the RECORD_TEXT_POKE; but you're right in that that doesn't seem to
matter much.
Either we run the old code or INT3 does 'something'. Then we get
RECORD_TEXT_POKE and finish the poke. Which tells that the moment INT3
stops the new text is in place.
I suppose that works too, and requires less changes.
next prev parent reply other threads:[~2019-08-29 11:46 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-31 7:21 [RFC v2 0/6] x86: dynamic indirect branch promotion Nadav Amit
2018-12-31 7:21 ` [RFC v2 1/6] x86: introduce kernel restartable sequence Nadav Amit
2018-12-31 20:08 ` Andy Lutomirski
2018-12-31 21:12 ` Nadav Amit
2019-01-03 22:21 ` Andi Kleen
2019-01-03 22:29 ` Nadav Amit
2019-01-03 22:48 ` Andi Kleen
2019-01-03 22:52 ` Nadav Amit
2019-01-03 23:40 ` Andi Kleen
2019-01-03 23:56 ` Nadav Amit
2019-01-04 0:34 ` hpa
2018-12-31 7:21 ` [RFC v2 2/6] objtool: ignore instructions Nadav Amit
2018-12-31 7:21 ` [RFC v2 3/6] x86: patch indirect branch promotion Nadav Amit
2018-12-31 7:21 ` [RFC v2 4/6] x86: interface for accessing indirect branch locations Nadav Amit
2018-12-31 7:21 ` [RFC v2 5/6] x86: learning and patching indirect branch targets Nadav Amit
2018-12-31 20:05 ` Andy Lutomirski
2018-12-31 21:07 ` Nadav Amit
2018-12-31 7:21 ` [RFC v2 6/6] x86: outline optpoline Nadav Amit
2018-12-31 19:51 ` [RFC v2 0/6] x86: dynamic indirect branch promotion Andy Lutomirski
2018-12-31 19:53 ` Nadav Amit
2019-01-03 18:10 ` Josh Poimboeuf
2019-01-03 18:30 ` Nadav Amit
2019-01-03 20:31 ` Josh Poimboeuf
2019-01-03 22:18 ` Andi Kleen
2019-01-07 16:32 ` Peter Zijlstra
2019-01-08 7:47 ` Adrian Hunter
2019-01-08 9:25 ` Peter Zijlstra
2019-01-08 10:01 ` Adrian Hunter
2019-01-08 10:10 ` Peter Zijlstra
2019-01-08 17:27 ` Andi Kleen
2019-01-08 18:28 ` Nadav Amit
2019-01-08 19:01 ` Peter Zijlstra
2019-01-08 20:47 ` Nadav Amit
2019-01-08 20:53 ` Andi Kleen
2019-01-09 10:35 ` Peter Zijlstra
2019-08-29 8:23 ` Tracing text poke / kernel self-modifying code (Was: Re: [RFC v2 0/6] x86: dynamic indirect branch promotion) Adrian Hunter
2019-08-29 8:53 ` Peter Zijlstra
2019-08-29 9:40 ` Adrian Hunter
2019-08-29 11:46 ` Peter Zijlstra [this message]
2019-09-12 7:00 ` Adrian Hunter
2019-09-12 12:17 ` hpa
2019-01-08 18:57 ` [RFC v2 0/6] x86: dynamic indirect branch promotion 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=20190829114602.GR2369@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=dwmw@amazon.co.uk \
--cc=ecree@solarflare.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=nadav.amit@gmail.com \
--cc=pabeni@redhat.com \
--cc=songliubraving@fb.com \
--cc=tglx@linutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).