lkml.org 
[lkml]   [2018]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CONFIG_PAGE_TABLE_ISOLATION=y on x86_64 causes gcc to segfault when building x86_32 binaries
From
Date
On 01/03/2018 02:14 PM, Andy Lutomirski wrote:
> + /* Use %rsp as scratch reg. User ESP is stashed in r8 */
> + SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp
> +
> + /* Switch to the kernel stack */
> movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp

The stack is unreadable at this point without the CR3 switch.

> What's the issue that this is fixing?

Users doing 32-bit SYSCALLs on the CPUs that support them double fault
since they end up with an %rsp that they can't access.

\
 
 \ /
  Last update: 2018-01-03 23:28    [W:0.119 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site