From: Vlastimil Babka <vbabka@suse.cz>
To: Alex Zhang <zhangalex@google.com>, linux-mm@kvack.org
Cc: Greg Thelen <gthelen@google.com>
Subject: Re: remap_pfn_range addr page alignment
Date: Tue, 5 Nov 2019 17:04:35 +0100 [thread overview]
Message-ID: <01cff98a-697e-c1b4-ddc2-9491347078a6@suse.cz> (raw)
In-Reply-To: <CA+LcrS2BYe1vjyS2cH+-H8bRfeJwtaw_kjoNf+hOZJcq1Nb1bA@mail.gmail.com>
On 10/16/19 9:57 PM, Alex Zhang wrote:
> Hey there!
>
> I was seeing some weird behavior where I was hitting
> random BUG_ONs in memory.c . After a bit of debugging,
> I traced it back to remap_pfn_range being my entry point
> into memory.c . Should the "addr" passed it be page aligned?
Most likely yes. How would you map if not on page boundary? I suspect it
was a bug in the caller?
> I see no documentation stating that nor do I see any checks
> in the code for it.
I suspect it was implicitly assumed. Most callers seem to pass
vma->vm_start as addr, which is page aligned. But 'size' parameter
alignment is fixed up, and it should be a similar case as addr.
Maybe a VM_BUG_ON check?
> Alex
>
next prev parent reply other threads:[~2019-11-05 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 19:57 Alex Zhang
2019-11-05 16:04 ` Vlastimil Babka [this message]
2019-11-05 17:46 ` Alex Zhang
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=01cff98a-697e-c1b4-ddc2-9491347078a6@suse.cz \
--to=vbabka@suse.cz \
--cc=gthelen@google.com \
--cc=linux-mm@kvack.org \
--cc=zhangalex@google.com \
/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