- File System
See also note on:
Serial port programing https://www.cmrr.umn.edu/~strupp/serial.html https://en.wikibooks.org/wiki/Serial_Programming/termios termios
The Definitive Guide to Linux System Calls some nice info on how syscalls happens. Interrupt x80,
syscall instruction etc. VDSO - v
fork- make new process.
inotify- be told when certain events happen
ptracea parent process can control another process. Gets to peek and poke memory. Control transferred on singals or system calls. Used by debuggers for example. Single step instructions
io_uringI think this is a set of new system calls. Fast io using a ring buffer. liburing library
io_ctldevice specific control calls
Linux Kernel Labs https://linux-kernel-labs.github.io/refs/heads/master/index.html
kernel documentation https://www.kernel.org/doc/html/latest/
no libc small pre-processed fixed size stack ~4kb no floating point?
processes are tracked
processes own resources
LSM linux security module selinux and apparmor are based on lsm
selinux is externally sandboxing a process. landlock is program developer voluntarily giving up access
https://twitter.com/kees_cook cool links
landlock restrict ambient rights, global file system access https://lwn.net/Articles/859908/ https://news.ycombinator.com/item?id=27215563 discussion about landlock, incudes ocmparsion of some other features
openbsd pledge, unveil
kmsan KernelMemorySanitizer, a detector of uses of uninitialized memory in the Linux kernel
libuv libev libevent
Disk sectors. Disk rotation speed Disk Seek time
RAID - Redundant array of inexpensive disks. Copy data to multiple disks, or use error correction. RAID0 just interleaves disks for parallelism striping - put subsequent blocks on different disks RAID 1 - mirroring. Just rwwrite the same thing to multiple disks
https://github.com/klange/toaruos complete operating system from scratch
Hypervisors - like OS for OSes
How do programs start?
Scheduling - interrupts
https://mirage.io/ mirage os
Microkernel Functional correctness But also binary level verification. Uses gcc but disassemblers result to verify
Booting is like a whole thing.
UEFI BIOS basic input output system - loads first sector and runs it. 16 bit code
POST - power on self test
MBR master boot record. 512 bytes. See sector lisp, sector forth, sector games
bootloader stages - more an more complex systems
TPM https://www.sweetwater.com/sweetcare/articles/tpm-and-secure-boot-what-are-they-and-how-do-i-enable-them/ secure boot So like malware can really fuck you by manipulating the boot process? I could see that.
Formal methods applied to booting
Formal Verification of a Modern Boot Loader 2018 - SABLE. Isabelle Towards a verified first-stage bootloader in Coq - 2020 - phd dissertation
https://www.kernel.org/doc/Documentation/filesystems/proc.txt proc documentation
cat /proc/self/mems cat /proc/self/status
https://osquery.readthedocs.io/en/stable/ query OS info as sqlite virtual table