From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Wed, 7 Oct 2015 18:02:15 +0100 Subject: UIO Devices and user processes In-Reply-To: References: <20151006052157.GA16343@kroah.com> <1444139935.3188.43.camel@opteya.com> <1444141921.3188.51.camel@opteya.com> Message-ID: <20151007170215.GA26439@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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