All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Linux Kernel /proc/*/mem Pseudofile: Understanding Punch Through Semantics for Unwritable Memory

By

medbar

2mo ago· 8 min readenInsight

Summary

This article explores the Linux kernel's /proc/*/mem pseudofile and its unique 'punch through' semantics that allow writes to succeed even when destination virtual memory is marked unwritable. The behavior is intentional and used by projects like Julia JIT compiler and rr debugger. The article examines the relationship between kernel memory access and hardware virtual memory permissions, questioning to what degree hardware can inhibit kernel memory access.

Key quotes

· 3 pulled
Writes performed through this file will succeed even if the destination virtual memory is marked unwritable.
This behavior is intentional and actively used by projects such as the Julia JIT compiler and rr debugger.
Is privileged code subject to virtual memory permissions? In general, to what degree can the hardware inhibit kernel memory access?
Snippet from the RSS feed
Introduction An obscure quirk of the /proc/*/mem pseudofile is its “punch through” semantics. Writes performed through this file will succeed even if the destination virtual memory is marked unwritable. In fact, this behavior is intentional and actively u

You might also wanna read