mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nadav Amit <namit@vmware.com>
To: Matt Mullins <mmullins@fb.com>
Cc: Borislav Petkov <bp@alien8.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"luto@kernel.org" <luto@kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	Christophe Leroy <christophe.leroy@c-s.fr>,
	Douglas Anderson <dianders@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint
Date: Fri, 31 May 2019 19:51:44 +0000	[thread overview]
Message-ID: <F51E9CDD-6936-46B8-967D-13F6BFEF8CE0@vmware.com> (raw)
In-Reply-To: <20190531194755.6320-1-mmullins@fb.com>

> On May 31, 2019, at 12:47 PM, Matt Mullins <mmullins@fb.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@fb.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@vmware.com>


  reply	other threads:[~2019-05-31 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 19:47 Matt Mullins
2019-05-31 19:51 ` Nadav Amit [this message]
2019-06-12 17:01 ` [tip:x86/urgent] x86/kgdb: Return 0 from kgdb_arch_set_breakpoint() tip-bot for Matt Mullins

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=F51E9CDD-6936-46B8-967D-13F6BFEF8CE0@vmware.com \
    --to=namit@vmware.com \
    --cc=bp@alien8.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmullins@fb.com \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --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®