SHARE
Facebook X Pinterest WhatsApp

BinaryFreedom.com: Kernel Internals, Part I; Accessing [UNIX] Kernel Internals; /proc and kvm

Written By
thumbnail
Web Webster
Web Webster
Jan 20, 2001

[ Thanks to Emmett for this link.
]

“For the most part, system calls are called through wrappers
in the C library (libc) or others. Although system calls are
usually sufficient for most applications, they simply can not
provide for the needs of every application. It would simply be
impractical for the kernel to provide system calls for every
exported data structure; however, the need is still there to access
some of the more exotic data structures that reside in the
kernel.
This niche of applications typically belongs to
speciality applications, such a s ‘ps’ and ‘top,’ that display
highly specialized information about processes on the system.”

“Kernel programmers solved this problem by providing an
interface, typically named /dev/kmem. This device, true to UNIX
traditions, is simply an interface to the kernel virtual memory of
the live system. Writing to the device will be reflected in the
virtual memory address space, likewise, reading from it will read
from the live kernel virtual memory address space. It’s quite clear
that the data structures we are interested in reside within this
address space.”

“KVM obviously has quite a few limitations; although it’s very
flexible, it also has potential to be insecure. Also,
non-privileged users (without setuid/setgid executables) cannot
enjoy the advantages it provides. With this in mind, and the need
for many users to access certain pieces of data typically contained
within the kernel, developers designed the /proc interface. /proc
is a filesystem provided by the kernel that acts as an interface to
certain in-kernel data structures.”

Complete
Story

thumbnail
Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Recommended for you...

5 Best Free and Open Source Text Expander Tools
webmaster
Jun 13, 2025
Grafito: Systemd Journal Log Viewer with a Beautiful Web UI
Bobby Borisov
Jun 12, 2025
FreeBSD Wants to Know a Few Things
brideoflinux
May 11, 2025
NVK enabled for Maxwell, Pascal, and Volta GPUs
Kara Bembridge
May 1, 2025
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.