[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160502142746.GA7142@redhat.com>
Date: Mon, 2 May 2016 16:27:46 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andy Lutomirski <luto@...capital.net>
Cc: X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Roland McGrath <roland@...k.frob.com>,
Andi Kleen <andi@...stfloor.org>,
Borislav Petkov <bp@...en8.de>, Brian Gerst <brgerst@...il.com>
Subject: Re: ptrace vs FSGSBASE
Hi Andy,
let me first say that I never knew how this code (and the hardware)
actually works, I am not sure I even understand what ARCH_SET_.S
exactly does ;)
What is even worse, I do not understand your question. So it is not
that I am trying to help, I am asking you to help me understand the
problem.
On 04/29, Andy Lutomirski wrote:
>
> 1. I read fs_base using ptrace. I think I should get the actual
> fs_base without any nonsense.
Which fs_base? The member of user_regs_struct? But this structure/layout
is just the ABI, so to me it seems correct that getreg() tries to look
at ->fs and/or ->fsindex.
IOW. getreg(fs) should return the same value as prctl(ARCH_GET_FS)
returns if called by the tracee, no?
> 2. I read all the regs (PEEKUSER or whatever) and then write then all
> back verbatim. At the very least, I think that if I do this
> atomically using PTRACE_SETREGSET, the task's state needs to remain
> unchanged.
Agreed... do you mean this doesn't work?
> Since ptrace doesn't seem to have any real concept of
> atomic register state changes right now
Could you spell please?
I can't understand what does "atomically" mean in this context.
Oleg.
Powered by blists - more mailing lists