lkml.org 
[lkml]   [2008]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Userspace I/O (UIO): Add support for userspace DMA (corrected)
> 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.


\
 
 \ /
  Last update: 2008-12-04 06:37    [W:0.164 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site