lkml.org 
[lkml]   [2020]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v9 00/17] Enable FSGSBASE instructions
Date


> On Apr 21, 2020, at 12:56 PM, Andi Kleen <ak@linux.intel.com> wrote:
>
> 
>>
>> Andi's point is that there is no known user it breaks, and the Intel
>> folks did some digging into potential users who might be affected by
>> this, including 'rr' brought up by Andy, and concluded that there won't
>> be breakage as a result of this patchset:
>>
>> https://mail.mozilla.org/pipermail/rr-dev/2018-March/000616.html
>>
>> Sure, if you poke at it you could see a behavior change, but is there
>> an actual user that will be affected by it? I suspect not.
>
> Actually we don't know of any behavior changes caused by the kernel
> with selectors.
>
> The application can change itself of course, but only if it uses the
> new instructions, which no current application does.

If you use ptrace to change the gs selector, the behavior is different on a patched kernel.

Again, I’m not saying that the change is problematic. But I will say that the fact that anyone involved in this series keeps ignoring this fact makes me quite uncomfortable with the patch set.

>
> [This was different in the original patch kit long ago which could
> change behavior on context switch for programs with out of sync selectors,
> but this has been long fixed]

That’s the issue I was referring to.

>
> A debugger can also change behavior, but we're not aware of any case
> that it would break.

How hard did you look?

>
> For rr or criu we're also not aware of any case that could break.
>
> I honestly don't know what else could be done in due diligence.
>
> Also just to reiterate merging this would immediately shave off
> hundreds of cycles in most context switches.
>
> -Andi

\
 
 \ /
  Last update: 2020-04-21 22:22    [W:0.113 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site