Re: gdbserver + fsgsbase kaputt
From: Borislav Petkov
Date: Mon Jan 11 2021 - 15:01:39 EST
On Mon, Jan 11, 2021 at 11:27:38AM -0800, Andy Lutomirski wrote:
> Hmm. Can you try booting with unsafe_fsgsbase and bisecting further?
Well, that bisection ended in that patch:
# first bad commit: [b745cfba44c152c34363eea9e052367b6b1d652b] x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit
so I can't go further.
Or do you mean I should add "unsafe_fsgsbase" to grub cmdline and bisect
with fsgsbase enabled in all test kernels?
> And maybe send me your test binary?
It is trivial:
int
main (void)
{
return 0;
}
how can that make any difference or are you thinking compiler differences?
Lemme send it to you.
> I tried to reproduce this, but it worked fine, even if I compile the
> test program with -fstack-protector-all.
Hmm.
> Off the top of my head, I would have expected this to fix it:
>
> commit 40c45904f818c1f6555294ca27afc5fda4f09e68
> Author: Andy Lutomirski <luto@xxxxxxxxxx>
> Date: Fri Jun 26 10:24:29 2020 -0700
>
> x86/ptrace: Fix 32-bit PTRACE_SETREGS vs fsbase and gsbase
More hmm.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette