Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753808AbbGXGhT (ORCPT ); Fri, 24 Jul 2015 02:37:19 -0400 Received: from mail.skyhub.de ([78.46.96.112]:59123 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbbGXGhR (ORCPT ); Fri, 24 Jul 2015 02:37:17 -0400 Date: Fri, 24 Jul 2015 08:37:10 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: Peter Zijlstra , Steven Rostedt , "security@kernel.org" , X86 ML , Sasha Levin , linux-kernel@vger.kernel.org, Konrad Rzeszutek Wilk , Boris Ostrovsky , Andrew Cooper , Jan Beulich , xen-devel , stable@vger.kernel.org Subject: Re: [PATCH v3 1/3] x86/ldt: Make modify_ldt synchronous Message-ID: <20150724063710.GA19245@nazgul.tnic> References: <049fdbab8ae2ecac1c8b40ecd558e9df45ccd5d3.1437592883.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <049fdbab8ae2ecac1c8b40ecd558e9df45ccd5d3.1437592883.git.luto@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1413 Lines: 37 On Wed, Jul 22, 2015 at 12:23:46PM -0700, 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. > > This will dramatically slow down modify_ldt in multithreaded > programs, but there shouldn't be any multithreaded programs that > care about modify_ldt's performance in the first place. > > Cc: stable@vger.kernel.org > Signed-off-by: Andy Lutomirski ... > +struct ldt_struct { > + /* > + * Xen requires page-aligned LDTs with special permissions. This is > + * needed to prevent us from installing evil descriptors such as > + * call gates. On native, we could merge the ldt_struct and LDT > + * allocations, but it's not worth trying to optimize. I don't think baremetal should care about xen and frankly, this is getting ridiculous, slowly - baremetal has to wait with a potentially critical security fix just because it breaks xen. Dammit, this level of intrusiveness into x86 should've never been allowed. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/