Received: by 10.223.185.116 with SMTP id b49csp3212952wrg; Mon, 5 Mar 2018 16:41:08 -0800 (PST) X-Google-Smtp-Source: AG47ELuA7tzbT0rDOm14exuHkqlO8dkbpPvOliWihjMu9Tiy10EJwRqhXvglXNku5ih82vFcE6LQ X-Received: by 10.99.38.135 with SMTP id m129mr6205316pgm.2.1520296868082; Mon, 05 Mar 2018 16:41:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520296868; cv=none; d=google.com; s=arc-20160816; b=dM/Y9/zIstbqwkqdKXf8fcNUzIDY1XlmwyOFOKH5WCvc7J3DguQEkuRwk0y4yjdEY4 MoWlySJySJXOL4oM4lQ1f4Ly9HHdWCR5ev13/l/yCMF2yObEtmpiSGoLzok9fe8Q6AF4 /Qjko3VPICt/p4ekn3AbZNnaET6XTjNxI0aoexBcQgsymuHycPIMu6WOF7lkPLBaBPIy MECdsLtM4pg+5x2o1VJeebYndfHAiDQCRDnxsHDY3y8pDV0vy6Bj0e5K3ErHkj8rbiMD he2K9G4r0o6BBUQmRWDmkwNr02cQsBQedEb7KQ2v+jB6rJTwzv1CvYNzSO0fv3Uzz/xk RJnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=eqvTvsgMmpe8Dtlc+KxCIy9Xpc3R8OZAuIuNHF8ZsnU=; b=LC+ZDMFkJKVqY7eGx5o8ouAaqN7JdP1mR01g3RpZ75dh11SAgbXFGznnuIYI9fzH2w YVWvFHiXLsAwSHVHZFkGqoFdKrshiSy64qT/l2TxKmFN+GbZFfvHuyNEnTCa+ElWfSMJ ViGBno7gkYQ7F6nrkzmS8eCaGFV3tP8rsgrBMwoJlH6oCeTfzODi/BEkq3jlYzoEHso6 ZZmBwQIofj0yAN4bFkdH/7VGa9Kt5yysYnQUlCgCFVJ+FxBkU5RIIku6Sw2OlyfZNll0 I9PqHkOTy3/ywoxvZbxO9XV2R3aqP4BgRajPisAk7JnJJ5UG96PWWBBtql9URmYFFVGW AC3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=BO6OmoWv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7-v6si6597940plk.627.2018.03.05.16.40.54; Mon, 05 Mar 2018 16:41:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=BO6OmoWv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933107AbeCFA0V (ORCPT + 99 others); Mon, 5 Mar 2018 19:26:21 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:34802 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932926AbeCFA0O (ORCPT ); Mon, 5 Mar 2018 19:26:14 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w260LXgd115049; Tue, 6 Mar 2018 00:26:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=eqvTvsgMmpe8Dtlc+KxCIy9Xpc3R8OZAuIuNHF8ZsnU=; b=BO6OmoWvAKoE297J0HXp+SpbRT4bHOsGPrMBz1Vna9NV2EJx6JkAdWeInZneSZXahaZK uBBN76GTPPz0/teT6yQ/zzXCfdjIgZs65/tzBo/OR3xaq3YYW/eDMZ+cTovuIFdkPUz4 ORsA5V05YBamfW6E6WevkOX11BoJbN6Ka0bT+uIQMpCIzt/Mz2ITSONee3KJB1oEbr05 ITHy4HtoNBJiFxJX0pRDgog8i+IVQFOppJtk7f1Qkvi2cJhIZ9Il8eT3LWYQ57N6bfwG iPI4oycgqXkfW7Jn8DtrjaaLWGRfDJ9Ze+6KShZOE0r4KUl3cZI3FL+rU5h4Khkk0CjQ QQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2ghdxf8k4j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Mar 2018 00:26:10 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w260Q98Q023120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Mar 2018 00:26:09 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w260Q9cS022041; Tue, 6 Mar 2018 00:26:09 GMT Received: from localhost.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 16:26:09 -0800 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, Alexander.Levin@microsoft.com, dan.j.williams@intel.com, sathyanarayanan.kuppuswamy@intel.com, pankaj.laxminarayan.bharadiya@intel.com, akuster@mvista.com, cminyard@mvista.com, pasha.tatashin@oracle.com, gregkh@linuxfoundation.org, stable@vger.kernel.org Subject: [PATCH 4.1 13/65] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly() Date: Mon, 5 Mar 2018 19:24:46 -0500 Message-Id: <20180306002538.1761-14-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180306002538.1761-1-pasha.tatashin@oracle.com> References: <20180306002538.1761-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8823 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803060003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Lutomirski commit 9ccee2373f0658f234727700e619df097ba57023 upstream. mark_screen_rdonly() is the last remaining caller of flush_tlb(). flush_tlb_mm_range() is potentially faster and isn't obsolete. Compile-tested only because I don't know whether software that uses this mechanism even exists. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Sasha Levin Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/791a644076fc3577ba7f7b7cafd643cc089baa7d.1492844372.git.luto@kernel.org Signed-off-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 6ce9d1e6819e53c4de0bf980555c4e07bbedb4ce) Signed-off-by: Pavel Tatashin --- arch/x86/kernel/vm86_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index fc9db6ef2a95..e0ae0a8ad5bd 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c @@ -194,7 +194,7 @@ static void mark_screen_rdonly(struct mm_struct *mm) pte_unmap_unlock(pte, ptl); out: up_write(&mm->mmap_sem); - flush_tlb(); + flush_tlb_mm_range(mm, 0xA0000, 0xA0000 + 32*PAGE_SIZE, 0UL); } -- 2.16.2