[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F51E9CDD-6936-46B8-967D-13F6BFEF8CE0@vmware.com>
Date: Fri, 31 May 2019 19:51:44 +0000
From: Nadav Amit <namit@...are.com>
To: Matt Mullins <mmullins@...com>
CC: Borislav Petkov <bp@...en8.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"luto@...nel.org" <luto@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Christophe Leroy <christophe.leroy@....fr>,
Douglas Anderson <dianders@...omium.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint
> On May 31, 2019, at 12:47 PM, Matt Mullins <mmullins@...com> wrote:
>
> err must be nonzero in order to reach text_poke(), which caused kgdb to
> fail to set breakpoints:
>
> (gdb) break __x64_sys_sync
> Breakpoint 1 at 0xffffffff81288910: file ../fs/sync.c, line 124.
> (gdb) c
> Continuing.
> Warning:
> Cannot insert breakpoint 1.
> Cannot access memory at address 0xffffffff81288910
>
> Command aborted.
>
> Fixes: 86a22057127d ("x86/kgdb: Avoid redundant comparison of patched code")
> Signed-off-by: Matt Mullins <mmullins@...com>
> ---
> arch/x86/kernel/kgdb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
> index 9a8c1648fc9a..6690c5652aeb 100644
> --- a/arch/x86/kernel/kgdb.c
> +++ b/arch/x86/kernel/kgdb.c
> @@ -758,7 +758,7 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
> BREAK_INSTR_SIZE);
> bpt->type = BP_POKE_BREAKPOINT;
>
> - return err;
> + return 0;
> }
>
> int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
> --
> 2.17.1
My bad. Thanks for fixing it.
Reviewed-by: Nadav Amit <namit@...are.com>
Powered by blists - more mailing lists