How to share memory between user space and kernel which is not backed by a file ? If mmap is done using MAP_ANON, how to share it with kernel space?
I have a data structure
struct data {
int x;
char* y;
};
This data structure is updated by user process and kernel. If I use mmap, I do not have a file which is backed. How do I do it. Also I cannot use copy_from_user as the structure is updated by kernel and user process periodically. Please let know