Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964778AbbGYIhj (ORCPT ); Sat, 25 Jul 2015 04:37:39 -0400 Received: from mail.skyhub.de ([78.46.96.112]:33375 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbbGYIhe (ORCPT ); Sat, 25 Jul 2015 04:37:34 -0400 Date: Sat, 25 Jul 2015 10:37:27 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: Andy Lutomirski , 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 Subject: Re: [PATCH v3 1/3] x86/ldt: Make modify_ldt synchronous Message-ID: <20150725083727.GB3427@nazgul.tnic> References: <049fdbab8ae2ecac1c8b40ecd558e9df45ccd5d3.1437592883.git.luto@kernel.org> <20150724152955.GC21441@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: 1313 Lines: 43 On Fri, Jul 24, 2015 at 09:52:01PM -0700, Andy Lutomirski wrote: > I see your wide terminal and raise you a complete rewrite of that > function. Sigh, why did I assume the old code was the right way to do > it? That's a mostly wrong assumption, as experience proves. > Hah¸ we both missed it. This is wrong. (Fix your backport!) Yikes: alloc_size = size * LDT_ENTRY_SIZE; But hey, I made you spot it, still! :-) Done. > I'm not sure this is correct, so I changed it to something obviously > correct (kmalloc/kfree). Someone thought she won't get contiguous memory from kmalloc(). But how big can alloc_size be to fail... > You read too many of Linus' comments about using wider terminals :) Nah, I'm just trying to put back some sanity in that 80 cols rule which, even you, think is a hard one. And I say, keep 80 cols but sanity can override it if what 80 cols produces, is crap. I trust you're sane enough to apply that and not think C++ or java wankery. Woahahahah... -- 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/