Skip to content

About

A custom Linux kernel extension for the Reptilian OS distribution that implements a process-level diagnostic logging subsystem integrated with the kernel's dmesg facility.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Linux System Calls

A modification to the Linux 4.14 kernel that adds system calls for controlling and writing to a system-wide process log.

Features

  • Retrieves the current process log threshold.
  • Allows privileged users to change the system-wide threshold.
  • Logs messages at severity levels 0–7 through the Linux kernel.
  • Includes the calling process name and PID in each message.
  • Limits messages to 128 characters and validates user-space memory.
  • Provides a small C library for calling the new system calls from user programs.

System Calls

Number System Call Purpose
548 get_proc_log_level Returns the current logging threshold
549 set_proc_log_level Updates the threshold when called with administrator privileges
550 proc_log_message Sends a process message to the kernel log

Messages are written only when their severity level is within the active logging threshold.

Repository Structure

  • kernel/process_log.patch — Kernel modifications
  • process_log/process_log.c — User-space library implementation
  • process_log/process_log.h — Library interface and system call definitions
  • process_log/Makefile — Builds the process logging library

Building the Library

cd process_log
make

Programs can link against the resulting library with:

gcc -o program program.c -L./process_log -lprocess_log

For C++ programs:

g++ -std=c++17 -o program program.cpp -L./process_log -lprocess_log

Applying the Kernel Patch

From the root of a clean Linux 4.14 kernel source tree:

patch -p1 < /path/to/process_log.patch

Rebuild and install the kernel after applying the patch.

Compatibility

This project was developed for the x86-64 Linux 4.14 kernel. It uses system call numbers 548–550 and may require changes for other kernel versions or architectures.

About

A custom Linux kernel extension for the Reptilian OS distribution that implements a process-level diagnostic logging subsystem integrated with the kernel's dmesg facility.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages