lkml.org 
[lkml]   [2014]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf_fuzzer compiled for x32 causes reboot
On 02/28/2014 07:40 AM, Peter Zijlstra wrote:
> On Fri, Feb 28, 2014 at 07:13:06AM -0800, H. Peter Anvin wrote:
>> If I'm reading this right we end up going from the page fault
>> tracepoint to copy_from_user_nmi() without going through NMI, and the
>> cr2 corruption is obvious. I guess the assumption that only the NMI
>> path needed to save cr2 is flawed?
>
> It was never assumed it would only go through NMI, but that it would be
> NMI safe -- and as it turns out, it is that.
>
> What I did assume was that any other callsites would be safe, seeing how
> they'd already be running in 'normal' contexts.
>
> I had not considered people putting tracepoints _that_ early in the
> exception paths.
>
> Note that there's more tracepoints there than the one mentioned.
>

Well, I was talking about the assumption spelled out in the comment
above copy_from_user_nmi() which pretty much states "cr2 is safe because
cr2 is saved/restored in the NMI wrappers."

-hpa


\
 
 \ /
  Last update: 2014-02-28 18:01    [W:0.226 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site