Re: [PATCH tip:x86/mm] x86/tls: Forcibly set the accessed bit in TLS segments

2017-03-21 Thread Ingo Molnar
* Andy Lutomirski wrote: > On Sat, Mar 18, 2017 at 10:17 PM, Andy Lutomirski wrote: > > For mysterious historical reasons, struct user_desc doesn't indicate > > whether segments are accessed. set_thread_area() has always > > programmed segments as non-accessed, so the first write will set the

Re: [PATCH tip:x86/mm] x86/tls: Forcibly set the accessed bit in TLS segments

2017-03-20 Thread Andy Lutomirski
On Sat, Mar 18, 2017 at 10:17 PM, Andy Lutomirski wrote: > For mysterious historical reasons, struct user_desc doesn't indicate > whether segments are accessed. set_thread_area() has always > programmed segments as non-accessed, so the first write will set the > accessed bit. This will fault if

[PATCH tip:x86/mm] x86/tls: Forcibly set the accessed bit in TLS segments

2017-03-18 Thread Andy Lutomirski
For mysterious historical reasons, struct user_desc doesn't indicate whether segments are accessed. set_thread_area() has always programmed segments as non-accessed, so the first write will set the accessed bit. This will fault if the GDT is read-only. Fix it by making TLS segments start out acc