lkml.org 
[lkml]   [2005]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.12-rc5-mm1
Andrea Arcangeli writes:
> Speed is not an issue, cr4 would never be tweaked unless you use
> seccomp, the cr4 flip is in an extreme slow path.
>
> I think there are two ways to solve this race:
>
> 1) why don't we read the cr4 from the cpu? would movl %%cr4, %%eax
> generate a general protection fault? Can the cr4 be read in ring 0?
> Why to read it from memory if we've that information in the cpu already?

Yes the kernel can read cr4. I believe the best solution is to modify
__flush_tlb_global() to read cr4's current value and mix it in when
toggling CR4.PGE and uploading mmu_cr4_features.
(But please make it conditional on CONFIG_SECCOMP.)

The code called from __switch_to() would have to set or clear cr4
locally only. That's easy using write_cr4() and read_cr4().

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-26 21:19    [W:0.127 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site