Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755066AbbGVCND (ORCPT ); Tue, 21 Jul 2015 22:13:03 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:33104 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbbGVCNB (ORCPT ); Tue, 21 Jul 2015 22:13:01 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Andy Lutomirski Date: Tue, 21 Jul 2015 19:12:40 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] x86/ldt: Make modify_ldt synchronous To: Brian Gerst Cc: Andy Lutomirski , Peter Zijlstra , Steven Rostedt , "security@kernel.org" , X86 ML , Borislav Petkov , Sasha Levin , Linux Kernel Mailing List , Konrad Rzeszutek Wilk , Boris Ostrovsky , stable Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 27 On Tue, Jul 21, 2015 at 7:01 PM, Brian Gerst wrote: > On Tue, Jul 21, 2015 at 3:59 PM, Andy Lutomirski wrote: >> modify_ldt has questionable locking and does not synchronize >> threads. Improve it: redesign the locking and synchronize all >> threads' LDTs using an IPI on all modifications. > > What does this fix? I can see sending an IPI if the LDT is > reallocated, but on every update seems unnecessary. > It prevents nastiness in which you're in user mode with an impossible CS or SS, resulting in potentially interesting artifacts in interrupts, NMIs, etc. > -- > Brian Gerst -- Andy Lutomirski AMA Capital Management, LLC -- 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/