lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/kgdb: Allow removal of early BPs
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?

\
 
 \ /
  Last update: 2021-01-26 12:48    [W:0.074 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site