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=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 C1CC4C2B9F4 for ; Mon, 14 Jun 2021 16:13:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BF396023E for ; Mon, 14 Jun 2021 16:13:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BF396023E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x2ksL/8TIvkhoVO9Q9ClaLUP8EQdNNa8UqLwBphhBSY=; b=k4BTKfxAC6kjVh AT+k2Mcmb+mQx9cOOlcSWsSBrIca5wNtux8CWe+922fgnH3Vjdh2VDjcBKD8+M6sDI8JnjJeyTybB hEOMSQC+6WX/veHVgq9FLe02gLoZraBGEmHJu/fLi76+4flHrZaziSG8o63yu/wRGDdtQGD7B0V0L 32Cg7eJGsbukW8pfnnZ8Ho4ZksJcIHj9+j/iWaYmOPouIJNd2vRTq7qmJPSM+VVm1Onj4KCQ0vObQ +FZBu9d5FZbNod4sSWf8hdxs+laONH1w/ocbz3qq2Tl1wbDY+2+sVq0LbGuayENDRspAA7CnxqxOg 0XR9yd4/uUWaTwigm9iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lspBq-00F1YP-CY; Mon, 14 Jun 2021 16:11:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsojc-00EpGk-AZ for linux-arm-kernel@lists.infradead.org; Mon, 14 Jun 2021 15:42:45 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9D2F761185; Mon, 14 Jun 2021 15:42:42 +0000 (UTC) Date: Mon, 14 Jun 2021 16:42:40 +0100 From: Catalin Marinas To: Gavin Shan Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, mark.rutland@arm.com, shan.gavin@gmail.com Subject: Re: [PATCH] arm64: mm: Pass origial fault address to handle_mm_fault() Message-ID: <20210614154239.GF30667@arm.com> References: <20210614122701.100515-1-gshan@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210614122701.100515-1-gshan@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210614_084244_453293_00965EEE X-CRM114-Status: GOOD ( 18.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 14, 2021 at 08:27:01PM +0800, Gavin Shan wrote: > Currently, the lower bits of fault address is cleared before it's > passed to handle_mm_fault(). It's unnecessary since generic code > does same thing since the commit 1a29d85eb0f19 ("mm: use vmf->address > instead of of vmf->virtual_address"). > > This passes the original fault address to handle_mm_fault() in case > the generic code needs to know the exact fault address. > > Signed-off-by: Gavin Shan > --- > arch/arm64/mm/fault.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > index 871c82ab0a30..e2883237216d 100644 > --- a/arch/arm64/mm/fault.c > +++ b/arch/arm64/mm/fault.c > @@ -504,7 +504,7 @@ static vm_fault_t __do_page_fault(struct mm_struct *mm, unsigned long addr, > */ > if (!(vma->vm_flags & vm_flags)) > return VM_FAULT_BADACCESS; > - return handle_mm_fault(vma, addr & PAGE_MASK, mm_flags, regs); > + return handle_mm_fault(vma, addr, mm_flags, regs); This seems to match most of the other architectures (arch/arm also masks out the bottom bits). So: Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel