TAILIEUCHUNG - On working with LKMs

On working with LKMs includes Privileged kernel information, The ‘/proc’ directory, The ‘cat’ command, Our own ‘cat’ workalike, Creating our own ‘/proc’ files, Our module’s organization, register/unregister. | On working with LKMs Using Linux Kernel Modules to quickly export privileged kernel information to ordinary users Privileged kernel information • Users ordinarily are prohibited from seeing what goes on inside a running Linux kernel • But we can use kernel modules to override normal restrictions on kernel data access • The handiest mechanism for doing this is to employ the so-called ‘/proc’ file system • Linux actually encourages this by offering quite a few examples, built in by default The ‘/proc’ directory • In addition to the normal files stored on a hard disk, UNIX systems support several types of ‘special’ files: – Directories and sub-directories (aka ‘folders’) – Symbolic links (., placeholders for pointers) – Device files (providing access to ‘peripherals’) – ‘Pseudo’ files (for data created ‘on-demand’) • Such ‘pseudo’ files are usually in ‘/proc’ The ‘cat’ command • This standard UNIX command offers users a quick way to view the text in a ‘/proc’ file • It’s not necessary to write an application program that will open, read, and display the transient contents of a ‘pseudo’ file • The file-concatenation operation transfers data from any file(s) to ‘standard output’ • Example: $ cat /proc/version More ‘/proc’ examples • • • • • • $ cat /proc/cpuinfo $ cat /proc/modules $ cat /proc/meminfo $ cat /proc/iomem $ cat /proc/devices $ cat /proc/self/maps [Read the ‘man-page’ for details: $ man .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.