Skip to content

Commit 803600e

Browse files
committed
bak
1 parent 7efc2f9 commit 803600e

File tree

1 file changed

+47
-8
lines changed

1 file changed

+47
-8
lines changed

aratu-week-2024-talk-by-ciro-santilli.bigb

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ Down November 2023 http://web.archive.org/web/20231110041847/https://pypi.org/pr
677677
\Image[https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/pypi.org_project_china-dictatorship_down.png]
678678
{height=916}
679679

680+
\Comment[[
680681
= Wall of pride and shame
681682
{parent=China dictatorship}
682683

@@ -687,22 +688,25 @@ Down November 2023 http://web.archive.org/web/20231110041847/https://pypi.org/pr
687688
|| Comments
688689

689690
| GitHub
690-
| \Image[https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg]{height=300}
691-
| \Image[https://web.archive.org/web/20230609155744im_/https://preview.redd.it/15l6tpf1dqd31.jpg?width=836&auto=webp&v=enabled&s=2b2f3b9f0ae40826858e0f3908f621ff86d62520]{height=300}
691+
| \image[https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg]{height=300}
692+
| \image[https://web.archive.org/web/20230609155744im_/https://preview.redd.it/15l6tpf1dqd31.jpg?width=836&auto=webp&v=enabled&s=2b2f3b9f0ae40826858e0f3908f621ff86d62520]{height=300}
692693
| https://github.com/cirosantilli/china-dictatorship
693694
| Exemplary. Never let me down. Has a public per-country takedown list: https://github.com/github/gov-takedowns/tree/master/China
694695

695696
| Stack Overflow
696-
| \Image[https://upload.wikimedia.org/wikipedia/commons/e/ef/Stack_Overflow_icon.svg]{height=300}
697-
| \Image[https://web.archive.org/web/20230609155744im_/https://preview.redd.it/15l6tpf1dqd31.jpg?width=836&auto=webp&v=enabled&s=2b2f3b9f0ae40826858e0f3908f621ff86d62520]{height=300}
697+
| \image[https://upload.wikimedia.org/wikipedia/commons/e/ef/Stack_Overflow_icon.svg]{height=300}
698+
| \image[https://web.archive.org/web/20230609155744im_/https://preview.redd.it/15l6tpf1dqd31.jpg?width=836&auto=webp&v=enabled&s=2b2f3b9f0ae40826858e0f3908f621ff86d62520]{height=300}
698699
| https://stackoverflow.com/users/895245/ciro-santilli-ourbigbook-com
699700
| Elected mods refuse to say what is allowed or not, you have to fight and infer from meta threads: https://meta.stackexchange.com/questions/366163/can-i-use-images-such-as-from-tiananmen-square-protests-to-criticise-the-chinese[]. But generally shaming anything the West does not like is OK.
701+
]]
700702

701703
= Linux Kernel Module Cheat
702704
{parent=Aratu Week 2024 Talk by Ciro Santilli}
703705

704706
https://github.com/cirosantilli/linux-kernel-module-cheat
705707

708+
\Video[https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg]
709+
706710
= Get a Linux terminal on QEMU
707711
{parent=Linux Kernel Module Cheat}
708712

@@ -819,19 +823,54 @@ Start QEMU and wait for GDB:
819823
./run --gdb-wait
820824
``
821825

822-
Connect GDB to QEMU and run up to a symbol that shows up at boot:
826+
On another shell, connect GDB to QEMU and run up to a symbol that shows up at boot:
823827
``
824828
./run-gdb start_kernel
825829
``
826830

827-
Outcome:
828-
``
831+
Outcome: we are GDB step debugging the Linux Kernel:
832+
``
833+
Breakpoint 1, start_kernel () at /root/lkmc/submodules/linux/init/main.c:837
834+
837 {
835+
loading vmlinux
836+
(gdb) n
837+
841 set_task_stack_end_magic(&init_task);
838+
(gdb) l
839+
836 asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
840+
837 {
841+
838 char *command_line;
842+
839 char *after_dashes;
843+
840
844+
841 set_task_stack_end_magic(&init_task);
845+
842 smp_setup_processor_id();
846+
843 debug_objects_early_init();
847+
844
848+
845 cgroup_init_early();
849+
(gdb) p &init_task
850+
$1 = (struct task_struct *) 0xffffffff82012840 <init_task>
851+
(gdb) bt
852+
#0 start_kernel () at /root/lkmc/submodules/linux/init/main.c:841
853+
#1 0xffffffff8215145c in x86_64_start_reservations (real_mode_data=<optimized out>) at /root/lkmc/submodules/linux/arch/x86/kernel/head64.c:490
854+
#2 0xffffffff821514e3 in x86_64_start_kernel (real_mode_data=0x138d0 <bts_ctx+2256> <error: Cannot access memory at address 0x138d0>) at /root/lkmc/submodules/linux/arch/x86/kernel/head64.c:471
855+
#3 0xffffffff810000e6 in secondary_startup_64 () at /root/lkmc/submodules/linux/arch/x86/kernel/head_64.S:243
856+
#4 0x0000000000000000 in ?? ()
857+
(gdb) up
858+
#1 0xffffffff8215145c in x86_64_start_reservations (real_mode_data=<optimized out>) at /root/lkmc/submodules/linux/arch/x86/kernel/head64.c:490
859+
490 start_kernel();
860+
(gdb) l
861+
485 break;
862+
486 default:
863+
487 break;
864+
488 }
865+
489
866+
490 start_kernel();
867+
491 }
829868
``
830869

831870
= Multiple architectures supported
832871
{parent=Linux Kernel Module Cheat}
833872

834-
E.g., if you want aarch64:
873+
E.g., if you want aarch64 instead of the default x86_64:
835874

836875
``
837876
./build -aA

0 commit comments

Comments
 (0)