All Projects → a-darwish → memfd-examples

a-darwish / memfd-examples

Licence: Unlicense License
Sample usage of the new memfd_create(2) Linux system call.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to memfd-examples

OpenHarmony
华为鸿蒙分布式操作系统(Huawei OpenHarmony)开发技术交流,鸿蒙技术资料,手册,指南,共建国产操作系统万物互联新生态。
Stars: ✭ 373 (+482.81%)
Mutual labels:  kernel
clr-boot-manager
Kernel & Boot Loader Management
Stars: ✭ 101 (+57.81%)
Mutual labels:  kernel
execmon
Advanced process execution monitoring utility for linux (procmon like)
Stars: ✭ 77 (+20.31%)
Mutual labels:  kernel
Driver.NET
Lightweight and flexible library to load and communicate with kernel drivers on Windows.
Stars: ✭ 59 (-7.81%)
Mutual labels:  kernel
Sphinx-Dipper
Sphinx Custom Kernel for Mi 8 (Dipper)
Stars: ✭ 17 (-73.44%)
Mutual labels:  kernel
sockdump
Dump unix domain socket traffic with bpf
Stars: ✭ 160 (+150%)
Mutual labels:  unix-domain-socket
KA27
A Mod version of KernelAdiutor (An application which manages kernel parameters)
Stars: ✭ 15 (-76.56%)
Mutual labels:  kernel
infinity
A secure, modern and intelligent operative system
Stars: ✭ 27 (-57.81%)
Mutual labels:  kernel
homebrew-i386-elf-toolchain
Homebrew formulas for buildling a valid GCC toolchain for the i386-elf target.
Stars: ✭ 62 (-3.12%)
Mutual labels:  kernel
operating-systems-usac-course
Operating Systems & Cloud Native Theory, Workshops, Guides, Cool Cloud Native Projects and students contribution area
Stars: ✭ 73 (+14.06%)
Mutual labels:  kernel
kernel-syslog
📝 Kernel module that can be used as a replacement for syslog, logger or logwrapper
Stars: ✭ 37 (-42.19%)
Mutual labels:  kernel
TravorOS
A simple OS running on Intel x86 architecture | No longer updating
Stars: ✭ 24 (-62.5%)
Mutual labels:  kernel
KnutOS
An x86_64 hobbyist OS written in C and Assembly
Stars: ✭ 16 (-75%)
Mutual labels:  kernel
go-nflog
c-binding free API for golang to communicate with the log subsystem of netfilter
Stars: ✭ 41 (-35.94%)
Mutual labels:  kernel
webpack-webhooks-plugin
Minimal kernel implemented in Rust
Stars: ✭ 44 (-31.25%)
Mutual labels:  kernel
SimpleOS
Operating System Coded in Assembly and C
Stars: ✭ 72 (+12.5%)
Mutual labels:  kernel
Understanding Linux Kernel Vulnerability
Understanding Linux Kernel Vulnerability
Stars: ✭ 21 (-67.19%)
Mutual labels:  kernel
SanderOSUSB
32 bit singletasking C kernel
Stars: ✭ 52 (-18.75%)
Mutual labels:  kernel
flower
A learning OS
Stars: ✭ 50 (-21.87%)
Mutual labels:  kernel
spylon-kernel
Jupyter kernel for scala and spark
Stars: ✭ 160 (+150%)
Mutual labels:  kernel

Introduction

This is a small server and client application for prototyping the new memfd_create(2) Linux system call.

Memfd is a simple memory sharing mechanism, added by the systemd/kdbus developers, to share pages between processes in an anonymous, no global registry needed, no mount-point required, relatively secure, manner. Check the references at the bottom of this page for primary documentation.

Internal details

Server creates a classic Unix domain socket, and waits for clients to connect.

Upon a client connection, server creates a memfd region and fill it with a unique message. The file descriptor for this memory region is then sealed and passed to the client using Unix domain sockets file-descriptor passing mechanisms.

On the client side, upon connecting with the server, it recreives the passed memfd file descriptor. Afterwards, the client tries to break the SHRINK, WRITE, and SEAL memfd seals added by the server.

If everything goes as planned, the client can go and read the server-sent message by mmap()-ing the passed file descriptor. This form of communication is both zero-copy, and hopefully secure-enough, for zero-trust IPC applications.

Requirements

  • Linux Kernel 3.17 or higher
  • Header files for such a kernel
    • Debian/Ubuntu: sudo apt-get install linux-headers-$(uname -r)
    • Redhat/Fedora: sudo yum -y kernel-headers-$(uname -r)
    • Arch Linux: sudo pacman -S linux-headers

References:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].