mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bae, Chang Seok" <chang.seok.bae@intel.com>
To: "Lutomirski, Andy" <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>,
	"tdevries@suse.com" <tdevries@suse.com>, x86-ml <x86@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"Metzger, Markus T" <markus.t.metzger@intel.com>
Subject: Re: gdbserver + fsgsbase kaputt
Date: Tue, 12 Jan 2021 06:15:39 +0000	[thread overview]
Message-ID: <5B5C1F0A-9780-4E42-BC65-742BAEE920BF@intel.com> (raw)
In-Reply-To: <E74AC970-CFCF-4CFD-A71F-F719F5BCE2DC@amacapital.net>


> On Jan 11, 2021, at 13:06, Andy Lutomirski <luto@amacapital.net> wrote:
> 
>> On Jan 11, 2021, at 12:00 PM, Borislav Petkov <bp@alien8.de> wrote:
>> 
>> Or do you mean I should add "unsafe_fsgsbase" to grub cmdline and bisect
>> with fsgsbase enabled in all test kernels?
> 
> Yes. But I can also look myself in a bit.

I was able to find this patch in that way:

commit 0bf7e460361c703333f3a82e50e7871465fe20f9
Author: Andy Lutomirski <luto@kernel.org>
Date:   Thu May 28 16:13:51 2020 -0400

    x86/process/64: Use FSBSBASE in switch_to() if available


The GDB behavior looks to be different between the two cases -- with vs
without gdb server, when I checked the GS/GSBASE values on the ptrace front.

It set the correct GSBASE (e.g.,=0xf7fcf0c0) of GS=0x63 without running the
server. But GSBASE=0 with the server. When I forced to set the correct base,
it exited normally.

Thanks,
Chang


  parent reply	other threads:[~2021-01-12  6:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 18:15 Borislav Petkov
2021-01-11 19:27 ` Andy Lutomirski
2021-01-11 20:00   ` Borislav Petkov
2021-01-11 21:06     ` Andy Lutomirski
2021-01-11 23:40       ` Andy Lutomirski
2021-01-11 23:52         ` Tom de Vries
2021-01-12  3:31           ` Andy Lutomirski
2021-01-12  8:45             ` Tom de Vries
2021-01-12  6:15       ` Bae, Chang Seok [this message]
2021-01-12 11:39         ` Metzger, Markus T
2021-01-12 16:53           ` Andy Lutomirski
2021-01-12 17:02             ` Metzger, Markus T
2021-01-12 17:13               ` Andy Lutomirski
2021-01-20 15:42                 ` Metzger, Markus T

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=5B5C1F0A-9780-4E42-BC65-742BAEE920BF@intel.com \
    --to=chang.seok.bae@intel.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=markus.t.metzger@intel.com \
    --cc=tdevries@suse.com \
    --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®