lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/4] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI
On Mon, Jan 08, 2018 at 05:49:00PM +0100, Peter Zijlstra wrote:
> On Mon, Jan 08, 2018 at 05:12:17PM +0100, Willy Tarreau wrote:
> > + if (doit) {
> > + if (arg2)
> > + task_thread_info(task)->flags |= _TIF_NOPTI;
> > + else
> > + task_thread_info(task)->flags &= ~_TIF_NOPTI;
>
> {set,clear}_thread_flag() please, the above is not SMP safe.

Oops, thank you. I initially thought about it initially but didn't
know the names of the functions to use, and have left it there
thinking I'd fix it later. Usual source of bugs :-/

Bah and I left my debugging printk() in the patch as well! I'll
rework this a bit.

Thanks,
Willy

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