mseal() – Enhancing Memory Security in Linux Kernel 6.10
Pravin Jogdand
Embedded Linux Engineer | Linux Kernel / System Programming | Linux Device Driver | USB PCIe Disk UART | Python C C++ | Shell Perl Scripting | Yocto | RTOS | 5G | Memory / Power Management | IoT | Signal Image Processing
Functionality
Security Enhancements
Compatibility
Operations Blocking
Overall Benefits
How to Use mseal()
Allocate Memory
void *addr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
Seal the Memory Using mseal()
int result = mseal(addr, size, MSEAL_SEAL);
if (result != 0) {
perror("mseal failed");
}
int result = mseal(addr, size, MSEAL_SEAL);
if (result != 0)
{
perror("mseal failed");
}
Memory Access Control
The sealed memory will now be protected from unauthorized modifications.
Unseal the Memory (if necessary)
result = mseal(addr, size, MSEAL_UNSEAL);
if (result != 0)
{
perror("mseal unseal failed");
}
#LinuxKernel #mseal #memory #Linux
Engineer | Passionate Technologist | Embedded Systems | Product Architecture | Strategy | Platform Development | R&D | Technology Design | Reverse Engineering | (F)OSS | Economics/Ecology nerd Radical Collaboration
7 个月did they take inspiration from the company mseal for this?
Network|Math|ML Acceleration (C/C++/RTL)
7 个月why a new syscall, why not using mprotect?