UIO Devices and user processes

Kenneth Adam Miller kennethadammiller at gmail.com
Wed Oct 7 14:10:25 EDT 2015


Well I don't think I'll have to write a custom allocator. Existing
allocators allow you to have placement allocation, or rather more
precisely, manage sub-buffers within a static buffer. By this I mean that
the sub buffer is treated as though it were an existing slab given to the
process by the OS, but instead of actually servicing it with new and free,
you place a table in it that acts just like the table that libc manages and
coalesces during regular management with typical use. In any case, I think
I don't have to do this because it's just a regular consumer producer
issue, and I can use ring buffers for that.

On Wed, Oct 7, 2015 at 1:02 PM, Greg KH <greg at kroah.com> wrote:

> On Tue, Oct 06, 2015 at 10:46:49AM -0400, Kenneth Adam Miller wrote:
> > Let me be more precise in general to the overall original question:
> >
> > I want a userland process that I designate to only use a specific hard
> coded
> > region physical of memory for it's heap. A UIO driver is the means by
> which
> > I've gone about seeking to achieve this.
>
> Use LD_PRELOAD to hook into your custom library that handles the
> allocation to this special portion of memory that you grabbed from the
> hardware using the UIO kernel interface instead of the "normal" libc
> allocator, and you will be fine.  But you will have to write a custom
> allocator, there's no other way around that.
>
> The kernel gives you the ability to do this today, no kernel changes
> needed, it's all "just" userspace code you will have to do on your own.
>
> Best of luck, that's going to be some "fun" work :)
>
> greg k-h
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151007/953b323e/attachment.html 


More information about the Kernelnewbies mailing list