Message ID | 20220718120212.3180-8-namit@vmware.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AAAEC433EF for <linux-mm@archiver.kernel.org>; Mon, 18 Jul 2022 19:37:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22D626B007B; Mon, 18 Jul 2022 15:37:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1667F6B007D; Mon, 18 Jul 2022 15:37:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFA9B6B007E; Mon, 18 Jul 2022 15:37:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DC7BE6B007B for <linux-mm@kvack.org>; Mon, 18 Jul 2022 15:37:15 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B785E34E8A for <linux-mm@kvack.org>; Mon, 18 Jul 2022 19:37:15 +0000 (UTC) X-FDA: 79701229230.08.3EA0D29 Received: from relay4.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by imf18.hostedemail.com (Postfix) with ESMTP id 51C171C0010 for <linux-mm@kvack.org>; Mon, 18 Jul 2022 19:37:15 +0000 (UTC) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0783D34E8A for <linux-mm@kvack.org>; Mon, 18 Jul 2022 19:37:15 +0000 (UTC) X-FDA: 79701229230.01.54B86B5 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by imf01.hostedemail.com (Postfix) with ESMTP id A2E6D40067 for <linux-mm@kvack.org>; Mon, 18 Jul 2022 19:37:14 +0000 (UTC) Received: by mail-pf1-f175.google.com with SMTP id b9so11547282pfp.10 for <linux-mm@kvack.org>; Mon, 18 Jul 2022 12:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ii9tnumcH6f4uVFiJaNvbNbCHj/eOFwFpwV99AWDIWY=; b=gF1O4Ap8c6u3Wl7EJAnk5cpari+SSbCrCwIHnkKi2iGutzFYOra9oMYtovijltSliX f9n+3+zOazFlTlGbgoP7cASWhUOA3yRUCNf36n4asDLBRZ2n5F6V77g8Ih0ng07spWdH HCMUUeGMN6x1yYhcSmRTYhGUaieuitiLXWFPOh9CH2CMEqYcyByqPimLVW+wP36dQPZe 1RJE9T2eaZawBkz5E8JuXZAG/5xKtgo8+wNL/iuOrcsSXLKNEDQJjqpz/5Yuv3v3GVFQ DvCcYoxTnP9tWp+lBd1uyqN2PAo5ihDVfdOn4Uj1GiSnYTj0YlvWIZ5h14BKB8GCHPjA 0gFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ii9tnumcH6f4uVFiJaNvbNbCHj/eOFwFpwV99AWDIWY=; b=iv8q0B49VRrQBKVK33Zi+a97CVTSQ/vXQurrRMamXtyL2GANUdiE02IImXOZ4zWgsL 4Cfz/MdwC73of8Ag1AjLmgmXGoKqoPgCS7u+ryRhwL28M3gHTcBqwpIlInI/5WbN0Aij e7Zct2kRLXvf7OmIrgTyzYOL5A/S821hppeeZqqZfseass0weJKRLu4WJHz3juESWw67 PhOStWNxdPyReJaRV390LyGUZAocZUwtnApvRktn6IZ+juLH+lJxvjijuvV8ozz1I8U9 FK7uxAOAca+8l48w14eBNRIl6GfxbzY9Bf7ZXBYl+XWMx2a8HMSgTL5Lxbxg/2q4KNZ4 KMfQ== X-Gm-Message-State: AJIora/P6+wDUnl7kY41usssUA8kAS8+bFNxDy3U0fxq2+f/OKMtYVqw P1f2AzleAZUKn38cNuMZKiloybiCmJOb7Q== X-Google-Smtp-Source: AGRyM1tECueM0uV0ckJl2HFWgTNipKEQZcrDzMSchFkRcqY0hBmCA7xorYY92YcZXwgaVycH49hQXg== X-Received: by 2002:a05:6a00:3388:b0:52a:c018:6cdf with SMTP id cm8-20020a056a00338800b0052ac0186cdfmr29910792pfb.55.1658173033302; Mon, 18 Jul 2022 12:37:13 -0700 (PDT) Received: from sc2-haas01-esx0118.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id q6-20020a170902a3c600b0016bc4a6ce28sm9907887plb.98.2022.07.18.12.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 12:37:12 -0700 (PDT) From: Nadav Amit <nadav.amit@gmail.com> X-Google-Original-From: Nadav Amit To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>, Mike Rapoport <rppt@linux.ibm.com>, Axel Rasmussen <axelrasmussen@google.com>, Nadav Amit <namit@vmware.com>, Andrea Arcangeli <aarcange@redhat.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Andy Lutomirski <luto@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>, David Hildenbrand <david@redhat.com>, Peter Xu <peterx@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will@kernel.org>, Yu Zhao <yuzhao@google.com>, Nick Piggin <npiggin@gmail.com> Subject: [RFC PATCH 07/14] mm: do fix spurious page-faults for instruction faults Date: Mon, 18 Jul 2022 05:02:05 -0700 Message-Id: <20220718120212.3180-8-namit@vmware.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220718120212.3180-1-namit@vmware.com> References: <20220718120212.3180-1-namit@vmware.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658173035; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ii9tnumcH6f4uVFiJaNvbNbCHj/eOFwFpwV99AWDIWY=; b=Qc/vmOjLrqE8B1NeJT/OJhXug1kVjAwEAK3K7xFX1w3D5vv08AgVBLkbjglK4aH+G6vjlD +GU0sF4IAza5vts8ym1OtcFfj3rBrhpKowNFQHjtrIB1HQibneKr+DRVMAXLHVaOyn7iHm alhdmz/8l6bFaaCr+q7LEyCOrM/a+gM= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gF1O4Ap8; spf=none (imf18.hostedemail.com: domain of MAILER-DAEMON@hostedemail.com has no SPF policy when checking 216.40.44.15) smtp.mailfrom=MAILER-DAEMON@hostedemail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658173035; a=rsa-sha256; cv=none; b=XQJ2TkGfDEyJpmuE5qsYyedskpeVN2YHzCx8rdMTmL/RRbjY6ctBdrd2jMhQhVLRJwNWqC AKuf5U6PDRB5MLJqnF9jKRqGrrSRZ+pz7OHwVZw7LG9p1/FslpTe+mMZx0YHXR9MQ25bWy LZFZ3kLypPra0LgXuZnmtSX3KbmL+P0= X-HE-Tag-Orig: 1658173034-732500 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gF1O4Ap8; spf=none (imf18.hostedemail.com: domain of MAILER-DAEMON@hostedemail.com has no SPF policy when checking 216.40.44.15) smtp.mailfrom=MAILER-DAEMON@hostedemail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 51C171C0010 X-Stat-Signature: msy4mhmouzp4jm65ii7wgu59spt1g99x X-Rspam-User: X-HE-Tag: 1658173035-205881 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> |
Series |
[RFC,01/14] userfaultfd: set dirty and young on writeprotect
|
expand
|
diff --git a/mm/memory.c b/mm/memory.c index 31ec3f0071a2..152a47876c36 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4924,7 +4924,7 @@ static vm_fault_t handle_pte_fault(struct vm_fault *vmf) * This still avoids useless tlb flushes for .text page faults * with threads. */ - if (vmf->flags & FAULT_FLAG_WRITE) + if (vmf->flags & (FAULT_FLAG_WRITE|FAULT_FLAG_INSTRUCTION)) flush_tlb_fix_spurious_fault(vmf->vma, vmf->address); } unlock: