From: Robert Hancock <hancockrwd@gmail.com>
To: Vira <sri1369_s@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Mapping non-page aligned data to user
Date: Thu, 05 Feb 2009 18:27:22 -0600 [thread overview]
Message-ID: <498B83EA.4040608@gmail.com> (raw)
In-Reply-To: <305692.9769.qm@web33402.mail.mud.yahoo.com>
Vira wrote:
> Hi,
>
> Is there a way to map a non-page aligned kernel physical address to user virtual address? remap_pfn_range and vm_insert_page operate only on page-aligned physical addresses.
>
> If there is no such support, would it be too complicated to try out
> writing something on my own to map non-page aligned addresses (the data
> size is under my control - so I can make that a multiple of page size)?
>
> Any suggestions appreciated.
The CPU, and therefore the kernel, couldn't ensure that the user doesn't
write outside the mapped region of kernel memory if it's not page
aligned (the access control is page granularity only). That seems like
it would be a show-stopper in most cases.
What exactly is it you're trying to achieve with this?
next prev parent reply other threads:[~2009-02-06 0:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 0:15 Mapping non-page aligned data to user Vira
2009-02-06 0:27 ` Robert Hancock [this message]
2009-02-06 2:29 ` Vira
[not found] <c2mBW-7mZ-15@gated-at.bofh.it>
2009-02-06 9:32 ` Bodo Eggert
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=498B83EA.4040608@gmail.com \
--to=hancockrwd@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sri1369_s@yahoo.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