Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbeAHRXx (ORCPT + 1 other); Mon, 8 Jan 2018 12:23:53 -0500 Received: from mga11.intel.com ([192.55.52.93]:7354 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753041AbeAHRXv (ORCPT ); Mon, 8 Jan 2018 12:23:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,330,1511856000"; d="scan'208";a="9590717" Subject: Re: [PATCH RFC 3/4] x86/pti: don't mark the user PGD with _PAGE_NX. To: Willy Tarreau References: <1515427939-10999-1-git-send-email-w@1wt.eu> <1515427939-10999-4-git-send-email-w@1wt.eu> <57039ac1-efe2-2f97-386f-dab0b90f64a5@intel.com> <20180108171707.GG10913@1wt.eu> Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, gnomes@lxorguk.ukuu.org.uk, torvalds@linux-foundation.org, Ingo Molnar , Peter Zijlstra , Borislav Petkov , Josh Poimboeuf , Andy Lutomirski From: Dave Hansen Message-ID: <407b4328-4447-38a5-15c1-0170741e3d14@intel.com> Date: Mon, 8 Jan 2018 09:23:49 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180108171707.GG10913@1wt.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/08/2018 09:17 AM, Willy Tarreau wrote: >> I think the prctl() should apply to an entire process, not to a thread. > > As I mentionned in another mail, I didn't know how to do it, even less > how to do it fast enough so that we didn't add more cycles to the syscall > code. You can _implement_ it with a task thread if you want. Just spray it across all threads at the prctl()-time instead of a single thread. It'll take a wee bit of locking. I just don't think the API should apply to a single thread.