Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935226AbeAHQtM (ORCPT + 1 other); Mon, 8 Jan 2018 11:49:12 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:41879 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935212AbeAHQtJ (ORCPT ); Mon, 8 Jan 2018 11:49:09 -0500 Date: Mon, 8 Jan 2018 17:49:00 +0100 From: Peter Zijlstra To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, gnomes@lxorguk.ukuu.org.uk, torvalds@linux-foundation.org Subject: Re: [PATCH RFC 2/4] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI Message-ID: <20180108164900.GO32035@hirez.programming.kicks-ass.net> References: <1515427939-10999-1-git-send-email-w@1wt.eu> <1515427939-10999-3-git-send-email-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515427939-10999-3-git-send-email-w@1wt.eu> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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.