[PATCH 0/2] kgdb: x86: fix breakpoint removal problems

Florian Rommel posted 2 patches 1 year, 5 months ago
There is a newer version of this series
arch/x86/kernel/kgdb.c    | 38 ++++++++++++++++++++++++++++++++++++++
include/linux/kgdb.h      |  3 +++
init/main.c               |  1 +
kernel/debug/debug_core.c |  7 ++++++-
4 files changed, 48 insertions(+), 1 deletion(-)
[PATCH 0/2] kgdb: x86: fix breakpoint removal problems
Posted by Florian Rommel 1 year, 5 months ago
This series fixes two problems with KGDB on x86 concerning the removal
of breakpoints, causing the kernel to hang.  Note that breakpoint
removal is not only performed when explicitly deleting a breakpoint,
but also happens before continuing execution or single stepping.

Florian Rommel (2):
  x86/kgdb: convert early breakpoints to poke breakpoints
  x86/kgdb: fix hang on failed breakpoint removal

 arch/x86/kernel/kgdb.c    | 38 ++++++++++++++++++++++++++++++++++++++
 include/linux/kgdb.h      |  3 +++
 init/main.c               |  1 +
 kernel/debug/debug_core.c |  7 ++++++-
 4 files changed, 48 insertions(+), 1 deletion(-)

-- 
2.46.0
Re: [PATCH 0/2] kgdb: x86: fix breakpoint removal problems
Posted by Andrew Morton 1 year, 5 months ago
On Mon, 12 Aug 2024 01:22:06 +0200 Florian Rommel <mail@florommel.de> wrote:

> This series fixes two problems with KGDB on x86 concerning the removal
> of breakpoints, causing the kernel to hang.  Note that breakpoint
> removal is not only performed when explicitly deleting a breakpoint,
> but also happens before continuing execution or single stepping.

Neat.  It would be nice to fix earlier kernels; for that it is
desirable to identify a Fixes: target.  From a quick look it appears
this issue is more than a decade old, in which case I don't believe a
Fixes: is needed - our request becomes "please backport to everything".
Re: [PATCH 0/2] kgdb: x86: fix breakpoint removal problems
Posted by Florian Rommel 1 year, 5 months ago
On Tue, 2024-08-13 at 17:10 -0700, Andrew Morton wrote:
> On Mon, 12 Aug 2024 01:22:06 +0200 Florian Rommel <mail@florommel.de> wrote:
> 
> > This series fixes two problems with KGDB on x86 concerning the removal
> > of breakpoints, causing the kernel to hang.  Note that breakpoint
> > removal is not only performed when explicitly deleting a breakpoint,
> > but also happens before continuing execution or single stepping.
> 
> Neat.  It would be nice to fix earlier kernels; for that it is
> desirable to identify a Fixes: target.  From a quick look it appears
> this issue is more than a decade old, in which case I don't believe a
> Fixes: is needed - our request becomes "please backport to everything".
> 

Thanks. There is already a v2 (due to my negligence on the details) and
a bit of discussion:
https://lore.kernel.org/all/20240812174338.363838-1-mail@florommel.de/

Rgeards,
Florian