You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable userland address space randomization. Test it out by running <<rand_check-out>> twice:
1027
+
1028
+
....
1029
+
./run -F '/rand_check.out;/poweroff.out'
1030
+
./run -F '/rand_check.out;/poweroff.out'
1031
+
....
1032
+
1033
+
If we remove it from our link:run[] script by hacking it up, the addresses shown by `rand_check.out` vary across boots.
1034
+
1035
+
Equivalent to:
1036
+
1037
+
....
1038
+
echo 0 > /proc/sys/kernel/randomize_va_space
1039
+
....
1040
+
1024
1041
=== insmod alternatives
1025
1042
1026
1043
==== modprobe
@@ -6509,6 +6526,10 @@ Unfortunately it is not working in the current QEMU: https://stackoverflow.com/q
6509
6526
6510
6527
Patches were merged in post v2.12.0-rc2 but it crashed for me and I opened a minimized bug report: https://bugs.launchpad.net/qemu/+bug/1762179
6511
6528
6529
+
We don't expose record and replay on our scripts yet since it was was not very stable, but we will do so when it stabilizes.
6530
+
6531
+
<<rand_check-out>> is a good way to test out if record and replay is actually deterministic.
6532
+
6512
6533
Alternatively, https://github.com/mozilla/rr[`mozilla/rr`] claims it is able to run QEMU: but using it would require you to step through QEMU code itself. Likely doable, but do you really want to?
6513
6534
6514
6535
==== QEMU trace multicore
@@ -8749,7 +8770,7 @@ Then proceed to do the following tests:
8749
8770
* `/count.sh` and `b __x64_sys_write`
8750
8771
* `insmod /timer.ko` and `b lkmc_timer_callback`
8751
8772
8752
-
===== Sanity checks
8773
+
==== Sanity checks
8753
8774
8754
8775
Basic C and C++ hello worlds:
8755
8776
@@ -8770,6 +8791,21 @@ Sources:
8770
8791
* link:kernel_module/user/hello.c[]
8771
8792
* link:kernel_module/user/hello_cpp.c[]
8772
8793
8794
+
===== rand_check.out
8795
+
8796
+
Print out several parameters that normally change randomly from boot to boot:
8797
+
8798
+
....
8799
+
./run -F '/rand_check.out;/poweroff.out'
8800
+
....
8801
+
8802
+
Source: link:kernel_module/user/rand_check.c[]
8803
+
8804
+
This can be used to check the determinism of:
8805
+
8806
+
* <<norandmaps>>
8807
+
* <<qemu-record-and-replay>>
8808
+
8773
8809
=== About
8774
8810
8775
8811
This project is for people who want to learn and modify low level system components:
0 commit comments