From: "Edward Estabrook" <edward.estabrook.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Greg KH <gregkh-l3A5Bk7waGM@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
hjk-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
edward.estabrook-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
edward_estabrook-+2HdxjxtzLdBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH 1/1] Userspace I/O (UIO): Add support for userspace DMA (corrected)
Date: Wed, 3 Dec 2008 21:34:40 -0800 [thread overview]
Message-ID: <208aa0f00812032134l5d0df1d9pa1359aba6e719e26@mail.gmail.com> (raw)
In-Reply-To: <20081204041739.GA16329-l3A5Bk7waGM@public.gmane.org>
> Anyway, what about 64bit processors? What happens if they try to use a
> valid address in this range?
>
> Is this value always an "invalid" value for all arches that Linux runs
> on?
Yes. I have run this on 64-bit systems.
The offset parameter in UIO is used to specify the memory-mapping index
of interest, where offset = N * getpagesize().
In include/linux/uio_driver.h we had:
#define MAX_UIO_MAPS 5
so assuming a page size of 4k the maximum legal value was 0x5000.
This logic is equally true on in any architecture.
With the dynamic DMA allocation one can now have an arbitrarily large
number of mappings. This magic number simply reduces the theoretical limit
to the number of distinct mappings to of 1,048,574.
Note that even if the in-kernel driver-stub choose to overload the mmap method
both the original code and these modifications would error out on any value
which did not correlate with a valid memory-mapping index number before
handing control to the overloaded implementation.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-12-04 5:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 1:51 [PATCH 1/1] Userspace I/O (UIO): Add support for userspace DMA (corrected) Edward Estabrook
[not found] ` <208aa0f00812031751n27a75d21h8747054651639463-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-04 4:17 ` Greg KH
[not found] ` <20081204041739.GA16329-l3A5Bk7waGM@public.gmane.org>
2008-12-04 5:34 ` Edward Estabrook [this message]
2008-12-04 19:40 ` Hans J. Koch
2008-12-06 0:16 ` Edward Estabrook
2008-12-11 0:33 ` Hans J. Koch
2008-12-25 12:30 ` Joerg Roedel
[not found] ` <20081225123004.GA13640-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2008-12-25 15:20 ` Hans J. Koch
2008-12-27 0:49 ` Andreas Bombe
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=208aa0f00812032134l5d0df1d9pa1359aba6e719e26@mail.gmail.com \
--to=edward.estabrook.lkml-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=edward.estabrook-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=edward_estabrook-+2HdxjxtzLdBDgjK7y7TUQ@public.gmane.org \
--cc=gregkh-l3A5Bk7waGM@public.gmane.org \
--cc=hjk-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).