From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2BC2C433F4 for ; Fri, 24 Aug 2018 23:44:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 622C1208CC for ; Fri, 24 Aug 2018 23:44:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 622C1208CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727488AbeHYDVJ (ORCPT ); Fri, 24 Aug 2018 23:21:09 -0400 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 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126] helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1ftLkW-0002xa-9S; Sat, 25 Aug 2018 00:44:16 +0100 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> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id 419456B3231 for ; Fri, 24 Aug 2018 19:44:47 -0400 (EDT) Received: by mail-wr1-f69.google.com with SMTP id z77-v6so9014940wrb.20 for ; Fri, 24 Aug 2018 16:44:47 -0700 (PDT) Received: from imap1.codethink.co.uk (imap1.codethink.co.uk. [176.9.8.82]) by mx.google.com with ESMTPS id o16-v6si1804562wmh.19.2018.08.24.16.44.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Aug 2018 16:44:45 -0700 (PDT) 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 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: owner-linux-mm@kvack.org List-ID: 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 On Mon, 2018-07-23 at 14:41 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.A A 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, > + A A A 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 A Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom