aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjack <[email protected]>2024-05-11 12:30:59 -0600
committerjack <[email protected]>2024-05-11 12:30:59 -0600
commit12319619edacc6c66a3425d6af766926bf583fba (patch)
tree34d334bcd344edac7c23109cc15c02bcaea126f5
parent5d67b724160f3f12b4ecbee798d7cff389d28479 (diff)
downloadsite-12319619edacc6c66a3425d6af766926bf583fba.tar.gz
site-12319619edacc6c66a3425d6af766926bf583fba.zip
kernel hacking & library routines
-rw-r--r--kernel.html303
1 files changed, 301 insertions, 2 deletions
diff --git a/kernel.html b/kernel.html
index 7fceabf..22eff55 100644
--- a/kernel.html
+++ b/kernel.html
@@ -70,7 +70,9 @@
<a href="#networking_support">networking support</a><br />
<a href="#file_systems">file systems</a><br />
<a href="#security_options">security options</a><br />
- <a href="#cryptographic_api"></a><br />
+ <a href="#cryptographic_api">cryptographic api</a><br />
+ <a href="#library_routines">library routines</a><br />
+ <a href="#kernel_hacking">kernel hacking</a><br />
<div id="top_level">
<h3>Top Level Options</h3>
<ul>
@@ -2104,6 +2106,303 @@
</ul>
</ul>
</div>
- <br />This is a WIP...
+ <div id="library_routines">
+ <h3>Library routines</h3>
+ The system will automatically enable the necessary things here. The
+ following are generally what's needed.
+ <ul>
+ <li>CORDIC algorithm (<code>CONFIG_CORDIC</code>): Y</li>
+ <li>CRC16 functions (<code>CONFIG_CRC16</code>): Y</li>
+ <li>
+ CRC calculation for the Rocksoft model CRC64
+ (<code>CONFIG_CRC64_ROCKSOFT</code>): Y
+ </li>
+ <li>CRC32/CRC32c functions (<code>CONFIG_CRC32</code>): Y</li>
+ <li>CRC64 functions (<code>CONFIG_CRC64</code>): Y</li>
+ </ul>
+ </div>
+ <div id="kernel_hacking">
+ <h3>Kernel hacking</h3>
+ Most options here are development related, but some offer security
+ enhancements.
+ <ul>
+ <li>printk and dmesg options</li>
+ <ul>
+ <li>
+ Show timing information on printks
+ (<code>CONFIG_PRINTK_TIME</code>): Y
+ </li>
+ <li>
+ Show caller information on printks
+ (<code>CONFIG_PRINTK_CALLER</code>): N
+ </li>
+ <li>
+ Show build ID information in stacktraces
+ (<code>CONFIG_STACKTRACE_BUILD_ID</code>): N
+ </li>
+ <li>
+ Default console loglevel (1-15)
+ (<code>CONFIG_CONSOLE_LOGLEVEL_DEFAULT</code>): 7, can be lowered to
+ silence chatty programs
+ </li>
+ <li>
+ quiet console loglevel (1-15)
+ (<code>CONFIG_CONSOLE_LOGLEVEL_QUIET</code>): 4
+ </li>
+ <li>
+ Default message log level (1-7)
+ (<code>CONFIG_MESSAGE_LOGLEVEL_DEFAULT</code>): 4
+ </li>
+ <li>
+ Delay each boot printk message by N milliseconds
+ (<code>CONFIG_BOOT_PRINTK_DELAY</code>): N, unless slow booting
+ system
+ </li>
+ <li>
+ Enable dynamic printk() support (<code>CONFIG_DYNAMIC_DEBUG</code>):
+ N
+ </li>
+ <li>
+ Enable core function of dynamic debug support
+ (<code>CONFIG_DYNAMIC_DEBUG_CORE</code>): N
+ </li>
+ <li>
+ Support symbolic error names in printf
+ (<code>CONFIG_SYMBOLIC_ERRNAME</code>): Y
+ </li>
+ <li>
+ Verbose BUG() reporting (<code>CONFIG_DEBUG_BUGVERBOSE</code>): N
+ </li>
+ </ul>
+ <li>Kernel debugging (<code>CONFIG_DEBUG_KERNEL</code>): Y</li>
+ <li>Miscellaneous debug code (<code>CONFIG_DEBUG_MISC</code>): N</li>
+ <li>Compile-time checks and compiler options</li>
+ <ul>
+ <li>
+ Debug information: Disable debug information
+ (<code>CONFIG_DEBUG_INFO_NONE</code>)
+ </li>
+ <li>
+ Warn for stack frames larger than (<code>CONFIG_FRAME_WARN</code>):
+ 2048
+ </li>
+ <li>
+ Strip assembler-generated symbols during link
+ (<code>CONFIG_STRIP_ASM_SYMS</code>): N
+ </li>
+ <li>
+ Install uapi headers to usr/include
+ (<code>CONFIG_HEADERS_INSTALL</code>): N
+ </li>
+ <li>
+ Make section mismatch errors non-fatal
+ (<code>CONFIG_SECTION_MISMATCH_WARN_ONLY</code>): Y
+ </li>
+ <li>
+ Force all function address 64B aligned
+ (<code>CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B</code>): N
+ </li>
+ <li>
+ Generate vmlinux.map file when linking
+ (<code>CONFIG_VMLINUX_MAP</code>): N
+ </li>
+ <li>
+ Force weak per-cpu definitions
+ (<code>CONFIG_DEBUG_FORCE_WEAK_PER_CPU</code>): N
+ </li>
+ </ul>
+ <li>Memory Debugging</li>
+ <ul>
+ <li>
+ Extend memmap on extra space for more information on page
+ (<code>CONFIG_PAGE_EXTENSION</code>): N
+ </li>
+ <li>
+ Debug page memory allocations (<code>CONFIG_DEBUG_PAGEALLOC</code>):
+ N
+ </li>
+ <li>
+ Enable SLUB debugging support (<code>CONFIG_SLUB_DEBUG</code>): N
+ </li>
+ <li>Track page owner (<code>CONFIG_PAGE_OWNER</code>): N</li>
+ <li>
+ Check for invalind mappings in user page tables
+ (<code>CONFIG_PAGE_TABLE_CHECK</code>): N
+ </li>
+ <li>
+ Poison pages after freeing (<code>CONFIG_PAGE_POISONING</code>): N
+ </li>
+ <li>
+ Testcase for the marking rodata read-only
+ (<code>CONFIG_DEBUG_RODATA_TEST</code>): N
+ </li>
+ <li>
+ Warn on W+X mappings at boot (<code>CONFIG_DEBUG_WX</code>): Y
+ </li>
+ <li>
+ Kernel memory leak detector (<code>CONFIG_DEBUG_KMEMLEAK</code>): N
+ </li>
+ <li>
+ Statistics for per-vma locks
+ (<code>CONFIG_PER_VMA_LOCK_STATS</code>): N
+ </li>
+ <li>
+ Debug object operations (<code>CONFIG_DEBUG_OBJECTS</code>): N
+ </li>
+ <li>
+ Stack utilization instrumentation
+ (<code>CONFIG_DEBUG_STACK_USAGE</code>): N
+ </li>
+ <li>
+ Detect stack corruption on calls to schedule()
+ (<code>CONFIG_SCHED_STACK_END_CHECK</code>): N
+ </li>
+ <li>Debug VM (<code>CONFIG_DEBUG_VM</code>): N</li>
+ <li>
+ Debug arch page table for semantics compliance
+ (<code>CONFIG_DEBUG_VM_PGTABLE</code>): N
+ </li>
+ <li>Debug VM translations (<code>CONFIG_DEBUG_VIRTUAL</code>): N</li>
+ <li>
+ Debug memory initialisation (<code>CONFIG_DEBUG_MEMORY_INIT</code>):
+ N
+ </li>
+ <li>
+ Debug access to per_cpu maps
+ (<code>CONFIG_DEBUG_PER_CPU_MAPS</code>): N
+ </li>
+ <li>
+ Enforce kmap_local temporary mappings
+ (<code>CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP</code>): N
+ </li>
+ <li>
+ KASAN: dynamic memory safety error detector
+ (<code>CONFIG_KASAN</code>): N
+ </li>
+ <li>
+ KFENCE: low-overhead sampling based memory safety error detector
+ (<code>CONFIG_KFENCE</code>): N
+ </li>
+ <li>
+ KMSAN: detector of unitialized values use
+ (<code>CONFIG_KMSAN</code>): N
+ </li>
+ </ul>
+ <li>Debug shared IRQ handlers (<code>CONFIG_DEBUG_SHIRQ</code>): N</li>
+ <li>Debug Oops, Lockups and Hangs</li>
+ <ul>
+ <li>Panic on Oops (<code>CONFIG_PANIC_ON_OOPS</code>): Y, SEC</li>
+ <li>panic timeout (<code>CONFIG_PANIC_TIMEOUT</code>): -1, SEC</li>
+ <li>
+ Detect Soft Lockups (<code>CONFIG_SOFTLOCKUP_DETECTOR</code>): N
+ </li>
+ <li>
+ Detect Hard Lockups (<code>CONFIG_HARDLOCKUP_DETECTOR</code>): N
+ </li>
+ <li>Detect Hung Tasks (<code>CONFIG_DETECT_HUNG_TASKS</code>): N</li>
+ <li>Detect Workqueue Stalls (<code>CONFIG_WQ_WATCHDOG</code>): N</li>
+ <li>
+ Report per-cpu work items which hog CPU for too long
+ (<code>CONFIG_WQ_CPU_INTENSIVE_REPORT</code>): N
+ </li>
+ </ul>
+ <li>
+ Enable extra timekeeping sanity checking
+ (<code>CONFIG_DEBUG_TIMEKEEPING</code>): N
+ </li>
+ <li>Debug preemptible kernel (<code>CONFIG_DEBUG_PREEMPT</code>): N</li>
+ <li>Lock Debugging (spinlocks, mutexes, etc...)</li>
+ <ul>
+ <li>None</li>
+ </ul>
+ <li>
+ Debugging for CPUs failing to respond to backtrace requests
+ (<code>CONFIG_NMI_CHECK_CPU</code>): N
+ </li>
+ <li>
+ Debug IRQ flag manipulation (<code>CONFIG_DEBUG_IRQFLAGS</code>): N
+ </li>
+ <li>
+ Stack backtrace support (<code>CONFIG_STACKTRACE</code>): Y, SEC
+ </li>
+ <li>
+ Warn for all uses of unseeded randomness
+ (<code>CONFIG_WARN_ALL_UNSEEDED_RANDOM</code>): N
+ </li>
+ <li>kobject debugging (<code>CONFIG_DEBUG_KOBJECT</code>): N</li>
+ <li>Debug kernel data structures</li>
+ <ul>
+ <li>
+ Debug linked list manipulation (<code>CONFIG_DEBUG_LIST</code>): Y,
+ SEC
+ </li>
+ <li>
+ Debug priority linked list manipulation
+ (<code>CONFIG_DEBUG_PLIST</code>): Y, SEC
+ </li>
+ <li>Debug SG table operations (<code>CONFIG_DEBUG_SG</code>): N</li>
+ <li>
+ Debug notifier call chains (<code>CONFIG_DEBUG_NOTIFIERS</code>): Y,
+ SEC
+ </li>
+ <li>Debug maple trees (<code>CONFIG_DEBUG_MAPLE_TREE</code>): N</li>
+ </ul>
+ <li>RCU Debugging</li>
+ <ul>
+ <li>None</li>
+ </ul>
+ <li>
+ Force round-robin CPU selection for unbound work items
+ (<code>CONFIG_DEBUG_WQ_FORCE_RR_CPU</code>): N
+ </li>
+ <li>
+ Enable CPU hotplug state control
+ (<code>CONFIG_CPU_HOTPLUG_STATE_CONTROL</code>): N
+ </li>
+ <li>
+ Latency measuring infrastructure (<code>CONFIG_LATENCYTOP</code>): N
+ </li>
+ <li>Traces (<code>CONFIG_FTRACE</code>): N</li>
+ <li>
+ Remote debugging over FireWire early on boot
+ (<code>CONFIG_PROVIDE_OHCI1394_DMA_INIT</code>): N
+ </li>
+ <li>Sample kernel code (<code>CONFIG_SAMPLES</code>): N</li>
+ <li>x86 Debugging</li>
+ <ul>
+ <li>
+ Enable verbose x86 bootup info message
+ (<code>CONFIG_X86_VERBOSE_BOOTUP</code>): Y
+ </li>
+ <li>Early printk (<code>CONFIG_EARLY_PRINTK</code>): N</li>
+ <li>Dump the EFI pagetable (<code>CONFIG_EFI_PGT_DUMP</code>): N</li>
+ <li>
+ Set upper limit of TLB entries to flush one-by-one
+ (<code>CONFIG_DEBUG_TLBFLUSH</code>): N
+ </li>
+ <li>
+ x86 instruction decoder selftest
+ (<code>CONFIG_X86_DECODER_SELFTEST</code>): N
+ </li>
+ <li>
+ IO delay type: port 0x80 based port-IO delay
+ (<code>CONFIG_IO_DELAY_0X80</code>)
+ </li>
+ <li>CPA self-test code (<code>CONFIG_CPA_DEBUG</code>): N</li>
+ <li>
+ Debug low-level entry code (<code>CONFIG_DEBUG_ENTRY</code>): N
+ </li>
+ <li>NMI Selftest (<code>CONFIG_DEBUG_NMI_SELFTEST</code>): N</li>
+ <li>Debug the x86 FPU code (<code>CONFIG_X86_DEBUG_FPU</code>): N</li>
+ <li>
+ ATOM Punit debug driver (<code>CONFIG_PUNIT_ATOM_DEBUG</code>): N
+ </li>
+ <li>
+ Choose kernel unwinder: ORC unwinder
+ (<code>CONFIG_UNWINDER_ORC</code>)
+ </li>
+ </ul>
+ </ul>
+ </div>
</body>
</html>