From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from imap1.codethink.co.uk ([176.9.8.82]:44714 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbeHYDVI (ORCPT ); Fri, 24 Aug 2018 23:21:08 -0400 Message-ID: <1535154250.2902.63.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 037/107] x86/mm: Factor out LDT init from context init From: Ben Hutchings To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Dave Hansen , Thomas Gleixner , Andrew Morton , Andy Lutomirski , Borislav Petkov , Brian Gerst , Dave Hansen , Denys Vlasenko , "H. Peter Anvin" , Linus Torvalds , Peter Zijlstra , Rik van Riel , linux-mm@kvack.org, Ingo Molnar , "Srivatsa S. Bhat" , "Matt Helsley (VMware)" , Alexey Makhalov , Bo Gan Date: Sat, 25 Aug 2018 00:44:10 +0100 In-Reply-To: <20180723122414.735940678@linuxfoundation.org> References: <20180723122413.003644357@linuxfoundation.org> <20180723122414.735940678@linuxfoundation.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On Mon, 2018-07-23 at 14:41 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: Dave Hansen > > commit 39a0526fb3f7d93433d146304278477eb463f8af upstream [...] > --- a/arch/x86/include/asm/mmu_context.h > +++ b/arch/x86/include/asm/mmu_context.h [...] > +static inline int init_new_context(struct task_struct *tsk, > +    struct mm_struct *mm) > +{ > + init_new_context_ldt(tsk, mm); > + return 0; > +} [...] This hides errors from init_new_context_ldt(), which is very bad. Fixed upstream by: commit ccd5b3235180eef3cfec337df1c8554ab151b5cc Author: Eric Biggers Date: Thu Aug 24 10:50:29 2017 -0700 x86/mm: Fix use-after-free of ldt_struct Ben. -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom