From: Catalin Marinas <catalin.marinas@arm.com>
To: Gavin Shan <gshan@redhat.com>
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()
Date: Mon, 14 Jun 2021 16:42:40 +0100 [thread overview]
Message-ID: <20210614154239.GF30667@arm.com> (raw)
In-Reply-To: <20210614122701.100515-1-gshan@redhat.com>
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 <gshan@redhat.com>
> ---
> 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 <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-14 16:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 12:27 [PATCH] arm64: mm: Pass origial fault address to handle_mm_fault() Gavin Shan
2021-06-14 15:42 ` Catalin Marinas [this message]
2021-06-15 11:11 ` Anshuman Khandual
2021-06-15 12:06 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210614154239.GF30667@arm.com \
--to=catalin.marinas@arm.com \
--cc=gshan@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=shan.gavin@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).