[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAFA6WYOdprGAe7d6ryLYpvC657qEGt1nRkpmuErDAk+msdp3DA@mail.gmail.com>
Date: Wed, 17 Feb 2021 16:36:26 +0530
From: Sumit Garg <sumit.garg@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...cs.fau.de, qy15sije@....cs.fau.de,
Thomas Gleixner <tglx@...utronix.de>, mingo@...hat.com,
bp@...en8.de, hpa@...or.com, alexandre.chartre@...cle.com,
rppt@...nel.org, ira.weiny@...el.com, adrian.hunter@...el.com,
gustavoars@...nel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
kgdb-bugreport@...ts.sourceforge.net
Subject: Re: [peterz@...radead.org: Re: [PATCH] x86/kgdb: Allow removal of
early BPs]
Hi Peter,
> 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?
>
Makes sense. I'll see if I can patch the debug core to get an
architecture neutral fix for this.
-Sumit
Powered by blists - more mailing lists