Skip to content

Very simple Inter Process Communication via character device driver to help people who want to run Android Binder-like IPC implementation

License

Notifications You must be signed in to change notification settings

jaebaek/IPC-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPC-101

Very simple Inter Process Communication via character device driver to help people who want to run Android Binder-like IPC implementation

Author

simpleDD

  • In the directory, you can check out the file hello.c and Makefile
  • Build
$ make
  • Test
$ sudo insmod hello.ko
$ lsmod
$ cat /dev/kmsg # this shows kernel message (i.e., `output of printk()`)
$ sudo rmmod hello
$ cat /dev/kmsg

simpleMsgDD

  • msg.c support sending and receiving message from a thread to another thread.

    • Note that it is very simple one (e.g., vulnerable to race condition, no multiple message support).
  • test.c save a string to the device driver and read the string from the device driver.

  • Build

$ make
$ gcc test.c
  • Test
$ sudo mknod /dev/simple_msg_dd c 250 0 # 250 is the major number used for register_chrdev()
$ sudo insmod hello.ko
$ lsmod
$ cat /dev/kmsg # this shows kernel message (i.e., `output of printk()`)
$ sudo ./a.out
$ cat /dev/kmsg
$ sudo rmmod hello
$ cat /dev/kmsg
$ sudo rm /dev/simple_msg_dd

About

Very simple Inter Process Communication via character device driver to help people who want to run Android Binder-like IPC implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published