Message ID | 20180924113121.409580745@linuxfoundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78848157B for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Sep 2018 12:16:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66C3229E91 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Sep 2018 12:16:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57E1D29E96; Mon, 24 Sep 2018 12:16:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 958F929E91 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Sep 2018 12:16:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80F0C8E0017; Mon, 24 Sep 2018 08:16:13 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7E6048E0001; Mon, 24 Sep 2018 08:16:13 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FBD28E0017; Mon, 24 Sep 2018 08:16:13 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id 30E148E0001 for <linux-mm@kvack.org>; Mon, 24 Sep 2018 08:16:13 -0400 (EDT) Received: by mail-pf1-f198.google.com with SMTP id b17-v6so240813pfo.20 for <linux-mm@kvack.org>; Mon, 24 Sep 2018 05:16:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=alSEjPXXyJQFMKGznH+ox1BWB0kspqWBemYhpoSzIh8=; b=UuCd5tocyVR6N1llsbCoOSo6sKFE0cnFZDalEXVgVWd+x0MJDxS+/e+Nug79rcp9b4 dh9g1CzSzZHo3T3UjMtcNdvnHo2FAZXPVFpL+adTiSRObAObOlgIz0+/pg/atcs/gxSZ bwL7OpsOf52wsVdqzU21g3VlHFWndiCtn0WUPstp0OHcdre8NqwE4gUuLJzp7oy3Jj19 N61FnmIpUqVhr+RE9fjqtptRwE8OxYgI3IDbXGLrlShPo38Dv6Qcfa5qHFbPy5boPpHA LirhX32FDFQG9Il3XFT092SG78WQqH7q1XVb+oFoTX9PqmStwiGm78LPupbMwhbwg+re iHAA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of gregkh@linuxfoundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org X-Gm-Message-State: ABuFfojNWqFQSGWdu85Wi+FasO6u/0g6Hs3uzDLm2ifTfel83JYooBpx jPflJ0fDscUosC7RPiaY2/GVTrjhDTkHNlASeiFIFtWQOngwMQudFtfYNpcFu08GQjWHGpzC771 8EB7eQngJb1Jt6FRfcetKI8vmfjVZjlAYkm4DTe6NWmRER4rJhTmeU5GC15N/nV/O3A== X-Received: by 2002:a17:902:6a:: with SMTP id 97-v6mr10299479pla.276.1537791372874; Mon, 24 Sep 2018 05:16:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV63gtb0PRAcSC1X/RSIGicPFRTFh45tJz2GNFVc45euAcyjIRySO8jRkfhuDn8DKCXXzNVRJ X-Received: by 2002:a17:902:6a:: with SMTP id 97-v6mr10299428pla.276.1537791372290; Mon, 24 Sep 2018 05:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537791372; cv=none; d=google.com; s=arc-20160816; b=M/e9FaQHIW0M74pTTynMoBTutVDxMhM6b73dM7onNt301pef8dYiwgT3okYlT/H+4Q BvhEObgGgLVood96JBE3j7O2WSUPbgWMcJiKuhQ8hx4vnlz9d3Lh2Czs9CdNLbj0aZ0a QcpSpdzaTZiBISw39gKYlotS9D8O8xqSFRyXS57dP2eTw6NlKjJkjqownGn9cGkJW+Wm kCCuOOA3nSXNn2XOdSFNZ5C2R/TRkprB2e6vqaiONJpicVG6gNxei0+w3DCjPIgVfnx6 ZfVRkVEzbF0RcP9cCtXbBAtsHvyUTL3cWEesEwoeqZNDsNXSzc1hdYM1V+mOELrcUO2q 5ZTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from; bh=alSEjPXXyJQFMKGznH+ox1BWB0kspqWBemYhpoSzIh8=; b=nSZEWb3xl6s8z10at7nsBn7a7xqbgzw9kV1yoKw1hVveeFIP39FwWaDL1jXAO+hDMr Crq4VVw5CIcWDFawSHIsF3saAJ8FsbFz9dNd0F7sujVQ/KjEDbhV/hLmYsXC2s1qMMbv iWuoIxPs8c3ZCpldfRX1Dsu9sYYKG1ltZifw+XSXQNyKbnv8Pt2iRHCqd1335B/UmbnO x4Qz2W77j6OfgNpzJnYIBToA3yhq8Ss98T70ZOx1pCy6XtzMIyL6+8ma8buLAWpNyxqw 5bEUArbuQS9ndoVMxMnFC90yiNj7ldm6UjG94l0iseQq6OouwJS38okNEHomosqXrxFc KMMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gregkh@linuxfoundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id k185-v6si12340214pgk.183.2018.09.24.05.16.12 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 05:16:12 -0700 (PDT) Received-SPF: pass (google.com: domain of gregkh@linuxfoundation.org designates 140.211.169.12 as permitted sender) client-ip=140.211.169.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gregkh@linuxfoundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1613310AA; Mon, 24 Sep 2018 12:16:11 +0000 (UTC) From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Joerg Roedel <jroedel@suse.de>, Thomas Gleixner <tglx@linutronix.de>, Pavel Machek <pavel@ucw.cz>, "H . Peter Anvin" <hpa@zytor.com>, linux-mm@kvack.org, Linus Torvalds <torvalds@linux-foundation.org>, Andy Lutomirski <luto@kernel.org>, Dave Hansen <dave.hansen@intel.com>, Josh Poimboeuf <jpoimboe@redhat.com>, Juergen Gross <jgross@suse.com>, Peter Zijlstra <peterz@infradead.org>, Borislav Petkov <bp@alien8.de>, Jiri Kosina <jkosina@suse.cz>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Brian Gerst <brgerst@gmail.com>, David Laight <David.Laight@aculab.com>, Denys Vlasenko <dvlasenk@redhat.com>, Eduardo Valentin <eduval@amazon.com>, Will Deacon <will.deacon@arm.com>, aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli <aarcange@redhat.com>, Waiman Long <llong@redhat.com>, "David H . Gutteridge" <dhgutteridge@sympatico.ca>, joro@8bytes.org, Sasha Levin <alexander.levin@microsoft.com> Subject: [PATCH 4.14 073/173] x86/mm/pti: Add an overflow check to pti_clone_pmds() Date: Mon, 24 Sep 2018 13:51:47 +0200 Message-Id: <20180924113121.409580745@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113114.334025954@linuxfoundation.org> References: <20180924113114.334025954@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
None
|
expand
|
--- a/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c @@ -291,6 +291,10 @@ pti_clone_pmds(unsigned long start, unsi p4d_t *p4d; pud_t *pud; + /* Overflow check */ + if (addr < start) + break; + pgd = pgd_offset_k(addr); if (WARN_ON(pgd_none(*pgd))) return;