From 4f82f79be7b0717c12924f4c9b7c4f46f8f18e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Thu, 13 Aug 2020 02:00:01 +0000 Subject: [PATCH] readme: underscore to - on all title ids --- README.adoc | 12 +++++++++--- common.py | 2 +- lkmc/x86_64.h | 4 ++-- run | 4 ++-- userland/arch/x86_64/rcl.S | 2 +- userland/linux/rand_check.c | 2 +- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.adoc b/README.adoc index 7d255bd..2b4d94d 100644 --- a/README.adoc +++ b/README.adoc @@ -108,7 +108,7 @@ If you don't want to wait, you could also try the following faster but much more but you will soon find that they are simply not enough if you anywhere near serious about systems programming. -After `./run`, QEMU opens up leaving you in the <>, and you can start playing with the kernel modules inside the simulated system: +After `./run`, QEMU opens up leaving you in the <>, and you can start playing with the kernel modules inside the simulated system: .... insmod hello.ko @@ -5965,7 +5965,7 @@ and so it is Read Only as shown by `ro`. ==== norandmaps -Disable userland address space randomization. Test it out by running <> twice: +Disable userland address space randomization. Test it out by running <> twice: .... ./run --eval-after './linux/rand_check.out;./linux/poweroff.out' @@ -10828,7 +10828,7 @@ A convenient shortcut to do both at once to test the feature is: By comparing the terminal output of both runs, we can see that they are the exact same, including things which normally differ across runs: * timestamps of dmesg output -* <> output +* <> output The record and replay feature was revived around QEMU v3.0.0. It existed earlier but it rot completely. As of v3.0.0 it is still flaky: sometimes we get deadlocks, and only a limited number of command line arguments are supported. @@ -13687,6 +13687,7 @@ Certain features may not work in Ruby. For example, <> creation Tested in gem5 d7d9bc240615625141cd6feddbadd392457e49eb. +[[gem5-ruby-mi-example-protocol]] ===== gem5 Ruby MI_example protocol This is the simplest of all protocols, and therefore the first one you should study to learn how Ruby works. @@ -22299,6 +22300,7 @@ A summary of results is shown at: xref:table-linux-calling-conventions[xrefstyle |=== +[[x86-64-calling-convention]] ==== x86_64 calling convention Examples: @@ -26423,6 +26425,7 @@ The cycle count is higher for `arm`, 350M vs 250M for `aarch64`, not nowhere nea A quick look at the boot logs show that they are basically identical in structure: the same operations appear more ore less on both, and there isn't one specific huge time pit in arm: it is just that every individual operation seems to be taking a lot longer. +[[gem5-x86-64-derivo3cpu-boot-panics]] ===== gem5 x86_64 DerivO3CPU boot panics https://github.com/cirosantilli2/gem5-issues/issues/2 @@ -28588,6 +28591,7 @@ ls /mnt/9p/rootfs_overlay This way you can just hack away the scripts and try them out immediately without any further operations. +[[out-rootfs-overlay-dir]] ===== out_rootfs_overlay_dir This path can be found with: @@ -28624,6 +28628,7 @@ Those files also contain arch specific helpers under ifdefs like: We try to keep as much as possible in those files. It bloats builds a little, but just makes everything simpler to understand. +[[lkmc-home]] ==== lkmc_home `lkmc_home` refers to the target base directory in which we put all our custom built stuff, such as <> and <>. @@ -28693,6 +28698,7 @@ arm_sve=False baremetal=True .... +[[rand-check-out]] ==== rand_check.out Print out several parameters that normally change randomly from boot to boot: diff --git a/common.py b/common.py index 3b9305b..f35e95f 100644 --- a/common.py +++ b/common.py @@ -556,7 +556,7 @@ Place the output files of userland build outputs inside the image within this additional prefix. This is mostly useful to place different versions of binaries with different build parameters inside image to compare them. See: * https://cirosantilli.com/linux-kernel-module-cheat#update-the-buildroot-toolchain -* https://cirosantilli.com/linux-kernel-module-cheat#out_rootfs_overlay_dir +* https://cirosantilli.com/linux-kernel-module-cheat#out-rootfs-overlay-dir ''' ) self.add_argument( diff --git a/lkmc/x86_64.h b/lkmc/x86_64.h index 701de0e..6bc5da0 100644 --- a/lkmc/x86_64.h +++ b/lkmc/x86_64.h @@ -43,7 +43,7 @@ /* Function epilogue. * - * https://cirosantilli.com/linux-kernel-module-cheat#x86_64-calling-convention + * https://cirosantilli.com/linux-kernel-module-cheat#x86-64-calling-convention */ #define LKMC_EPILOGUE \ add $8, %rsp; \ @@ -59,7 +59,7 @@ /* Function prologue. * - * https://cirosantilli.com/linux-kernel-module-cheat#x86_64-calling-convention + * https://cirosantilli.com/linux-kernel-module-cheat#x86-64-calling-convention */ #define LKMC_PROLOGUE \ .text; \ diff --git a/run b/run index 68373fb..991d53d 100755 --- a/run +++ b/run @@ -88,7 +88,7 @@ which is what you usually want. Replace the normal init with a minimal init that just evals the given sh string. See: https://cirosantilli.com/linux-kernel-module-cheat#replace-init chdir into lkmc_home before running the command: -https://cirosantilli.com/linux-kernel-module-cheat#lkmc_home +https://cirosantilli.com/linux-kernel-module-cheat#lkmc-home ''' ) self.add_argument( @@ -203,7 +203,7 @@ Pass a base64 encoded command line parameter that gets evalled at the end of the normal init. See: https://cirosantilli.com/linux-kernel-module-cheat#init-busybox chdir into lkmc_home before running the command: -https://cirosantilli.com/linux-kernel-module-cheat#lkmc_home +https://cirosantilli.com/linux-kernel-module-cheat#lkmc-home Specify the Linux kernel version to be reported by syscall emulation. Defaults to the same kernel version as our default Buildroot build. Currently only works for QEMU. diff --git a/userland/arch/x86_64/rcl.S b/userland/arch/x86_64/rcl.S index 0dc1728..fb23a6b 100644 --- a/userland/arch/x86_64/rcl.S +++ b/userland/arch/x86_64/rcl.S @@ -9,7 +9,7 @@ LKMC_PROLOGUE rcl $1, %r12b /* We'll have to save and restore flags across our asserts! * 2x PUSHF to maintain 16-bit stack alignment. - * https://cirosantilli.com/linux-kernel-module-cheat#x86_64-calling-convention + * https://cirosantilli.com/linux-kernel-module-cheat#x86-64-calling-convention */ pushf pushf diff --git a/userland/linux/rand_check.c b/userland/linux/rand_check.c index c63c9de..393e6eb 100644 --- a/userland/linux/rand_check.c +++ b/userland/linux/rand_check.c @@ -1,4 +1,4 @@ -/* https://cirosantilli.com/linux-kernel-module-cheat#rand_check-out */ +/* https://cirosantilli.com/linux-kernel-module-cheat#rand-check-out */ #include #include