Hi all,
I'm struggling with modifying the Ram_dataspace in base-linux. I have replaced the file descriptor opened in
void Ram_dataspace_factory::_export_ram_ds(Dataspace_component *ds)
in base-linux/src/core/ram_daraspace_support.cc by opening a special device file that provides mappable ram.
I have attached the exact diff that causes the segfault. The kernel module that provides the device file and the ioctl is available at [1]. I have tested it on a Linux system and mapping memory and reading/writing it worked flawlessly.
With this change each component creates a segmentation fault. I was not able to trace it, I couldn't even find out in which file it occurs. The instruction pointer randomly appeared in repos/base/src/lib/base/lock.cc or in repos/base/src/lib/base/heap.cc. I have touched neither of these files.
Is there any information about where this is used exactly? I was unable to trace the usage of the mapped memory beyond Region_map_mmap::attach. I have also traced the calls inside the kernel module and it looks as it only uses open, mmap and close so there shouldn't a problem. I'd like to give you further information about this but I have absolutely no idea by myself.
Regards, Johannes
[1]: https://github.com/jklmnn/hwiodev/blob/0f5d367162812ee015434e5b97fdf208ef362...