diff --git a/README.adoc b/README.adoc index 2973365..410cf41 100644 --- a/README.adoc +++ b/README.adoc @@ -13903,15 +13903,19 @@ https://en.wikipedia.org/wiki/Fork_bomb DANGER! Only run this on your host if you have saved all data you care about! Better run it inside an emulator! QEMU v4.0.0 <> is not safe enough either because it is very native does not limit guest memory, so it will still blow up the host! -So without further ado, let's rock: +So without further ado, let's rock with either: .... ./run --eval-after './posix/fork_bomb.out danger' +./run --eval-after './fork_bomb.sh danger' .... -Source: link:userland/posix/fork_bomb.c[] +Sources: -Outcome on LKMC 762cd8d601b7db06aa289c0fca7b40696299a868 + 1: after a few seconds of an unresponsive shell, we get a visit form the <>, and the system is restored! +* link:userland/posix/fork_bomb.c[] +* link:rootfs_overlay/lkmc/fork_bomb.sh[] + +Outcome for the C version on LKMC 762cd8d601b7db06aa289c0fca7b40696299a868 + 1: after a few seconds of an unresponsive shell, we get a visit form the <>, and the system is restored! ==== pthreads diff --git a/rootfs_overlay/lkmc/fork_bomb.sh b/rootfs_overlay/lkmc/fork_bomb.sh new file mode 100755 index 0000000..fba6c80 --- /dev/null +++ b/rootfs_overlay/lkmc/fork_bomb.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# https://cirosantilli.com/linux-kernel-module-cheat#fork-bomb +if [ "$1" = danger ]; then + bomb() { + bomb | bomb & + } + bomb +fi