Read some other modules that do what you want.
There are lots of options for how to do this in the Linux kernel, including:
- virtual filesystems, e.g. /proc, /sys, configfs, relayfs (really look at relayfs)
- netlink
- blocking syscalls
- poll() / epoll() & related
/proc is probably the easiest to start with since it has been around forever and there is a ton of documentation on how to use it. Create a virtual file that maps to your buffer, then have your userspace app open an fd and use select. Simple and ubiquitous. There are more modern and "better" ways - they will inevitably be described in terms of /proc + select() so learning those first will teach you something useful.