Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sorry to answer but not quite answer, I noticed that you have already edited the question. Please note that SO does not notify us when you edit the question. I'm giving a generic answer here, when you update the question please leave a comment, then I'll edit my answer.</p> <p>Yes, you're going to need to write a module. What it comes down to is the use of <code>kmalloc()</code> (allocating a region in kernel space) or <code>vmalloc()</code> (allocating a region in userspace).</p> <p>Exposing the prior is easy, exposing the latter can be a pain in the rear with the kind of interface that you are describing as needed. You noted 1.5 MB is a rough estimate of how much you actually need to reserve, is that iron clad? I.e are you comfortable taking that from kernel space? Can you adequately deal with ENOMEM or EIO from userspace (or even disk sleep)? IOW, what's going into this region?</p> <p>Also, is concurrency going to be an issue with this? If so, are you going to be using a futex? If the answer to either is 'yes' (especially the latter), its likely that you'll have to bite the bullet and go with <code>vmalloc()</code> (or risk kernel rot from within). Also, if you are even THINKING about an <code>ioctl()</code> interface to the char device (especially for some ad-hoc locking idea), you really want to go with <code>vmalloc()</code>.</p> <p>Also, have you read <a href="http://web.archive.org/web/20130128033921/http://www.scs.ch/~frey/linux/memorymap.html" rel="nofollow noreferrer">this</a>? Plus we aren't even touching on what grsec / selinux is going to think of this (if in use).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload