mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stefan Saecherl <stefan.saecherl@fau.de>
Cc: x86@kernel.org, linux-kernel@i4.cs.fau.de,
	Lorena Kretzschmar <qy15sije@cip.cs.fau.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Alexandre Chartre <alexandre.chartre@oracle.com>,
	Mike Rapoport <rppt@kernel.org>, Ira Weiny <ira.weiny@intel.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/kgdb: Allow removal of early BPs
Date: Tue, 26 Jan 2021 12:39:17 +0100	[thread overview]
Message-ID: <YA//ZcJAyQPEtybr@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20201214141314.5717-1-stefan.saecherl@fau.de>

On Mon, Dec 14, 2020 at 03:13:12PM +0100, Stefan Saecherl wrote:

> One thing to consider when doing this is that code can go away during boot
> (e.g. .init.text). Previously kgdb_arch_remove_breakpoint handled this case
> gracefully by just having copy_to_kernel_nofault fail but if one then calls
> text_poke_kgdb the system dies due to the BUG_ON we moved out of
> __text_poke.  To avoid this __text_poke now returns an error in case of a
> nonpresent code page and the error is handled at call site.

So what if the page is reused and now exists again?

We keep track of the init state, how about you look at that and not poke
at .init.text after it's freed instead?

  parent reply	other threads:[~2021-01-26 11:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 14:13 Stefan Saecherl
2020-12-18 16:44 ` Daniel Thompson
2021-01-25 13:17   ` Lorena Kretzschmar
2021-01-26 11:39 ` Peter Zijlstra [this message]
2021-01-27 14:17   ` Borislav Petkov

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=YA//ZcJAyQPEtybr@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexandre.chartre@oracle.com \
    --cc=bp@alien8.de \
    --cc=gustavoars@kernel.org \
    --cc=hpa@zytor.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=qy15sije@cip.cs.fau.de \
    --cc=rppt@kernel.org \
    --cc=stefan.saecherl@fau.de \
    --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

all inboxes | Powered by JetHome®