GithubHelp home page GithubHelp logo

vusec / kasper Goto Github PK

View Code? Open in Web Editor NEW
52.0 22.0 8.0 67 KB

Kasper: Scanning for Generalized Transient Execution Gadgets in the Linux Kernel

Home Page: https://vusec.net/projects/kasper

License: Apache License 2.0

CMake 4.40% C++ 35.08% Python 8.26% Shell 1.63% C 49.33% Assembly 1.31%

kasper's Introduction

Kasper: Scanning for Generalized Transient Execution Gadgets in the Linux Kernel

We present Kasper, a speculative execution gadget scanner for the Linux kernel. Kasper uses taint analysis policies to model an attacker capable of exploiting arbitrary software/hardware vulnerabilities on a transient path to control data (e.g., through memory massaging or LVI), access secrets (e.g., through out-of-bounds or use-after-free accesses), and leak these secrets (e.g., through cache-based, MDS-based, or port contention-based covert channels). Even though the kernel is heavily hardened against transient execution attacks, Kasper finds hundreds of gadgets that are not yet mitigated. You can find the full paper here.

Setting up

Install dependencies, including go-task as a task-runner:

sudo apt install build-essential clang-11 lld-11 libelf-dev qemu-system-x86 bison flex golang libssl-dev cmake debootstrap python3-pexpect socat ninja-build ccache
sudo sh -c "$(curl -ssL https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin

Initialize/update git submodules (this will take awhile the first time it's run):

task update

Building

Create an initramfs and a disk image to be used with syzkaller:

task initramfs:create
task syzkaller:create-image

Configure and build LLVM with Kasper support:

task llvm:config llvm:build

Build syzkaller with Kasper support:

WARNING: the version of syzkaller we use only works with golang 1.15 (we are using golang 1.15.15)!

task syzkaller:build

Configure and build a Kasper-instrumented Linux kernel:

task kernel:config build kernel:bzImage

Running

Test that the instrumented kernel runs correctly:

task qemu:test

Fuzz the instrumented kernel:

task syzkaller:run-nobench

Evaluation

To aggregate gadgets and run the evaluation please check out kasper-results.

kasper's People

Contributors

bjohannesmeyer avatar jakob-koschel avatar magickaiyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kasper's Issues

Failed to run task "Update"

The described setup steps do not work properly on a freshly installed Ubuntu 20.04.5. Running task update after installing the dependencies gives me

~/kasper$ task update
task: [update] git submodule update --init --progress
Cloning into '/home/kasper/kasper/kasper-results'...
Warning: Permanently added the ECDSA host key for IP address '140.82.121.4' to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:vusec/kasper-results.git' into submodule path '/home/kasper/kasper/kasper-results' failed
Failed to clone 'kasper-results'. Retry scheduled
Cloning into '/home/kasper/kasper/kdfsan-linux'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:vusec/kdfsan-linux.git' into submodule path '/home/kasper/kasper/kdfsan-linux' failed
Failed to clone 'kdfsan-linux'. Retry scheduled
Cloning into '/home/kasper/kasper/kdfsan-llvm-project'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:vusec/kdfsan-llvm-project.git' into submodule path '/home/kasper/kasper/kdfsan-llvm-project' failed
Failed to clone 'kdfsan-llvm-project'. Retry scheduled
Cloning into '/home/kasper/kasper/kdfsan-syzkaller'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:vusec/kdfsan-syzkaller.git' into submodule path '/home/kasper/kasper/kdfsan-syzkaller' failed
Failed to clone 'kdfsan-syzkaller'. Retry scheduled
Cloning into '/home/kasper/kasper/kasper-results'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:vusec/kasper-results.git' into submodule path '/home/kasper/kasper/kasper-results' failed
Failed to clone 'kasper-results' a second time, aborting
task: Failed to run task "update": exit status 1

This is caused by entries in the .gitmodules files which provide SSH links to the submodules that require some whitelisted SSH key. I was able to fix the issue by applying the following patch that updates the SSH links to HTTPS links:

diff --git a/.gitmodules b/.gitmodules
index c1cad20..984eb24 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,16 +1,16 @@
 [submodule "kdfsan-linux"]
        path = kdfsan-linux
-       url = [email protected]:vusec/kdfsan-linux.git
+       url = https://github.com/vusec/kdfsan-linux.git
        branch = kasper-linux-v5.12
 [submodule "kdfsan-llvm-project"]
        path = kdfsan-llvm-project
-       url = [email protected]:vusec/kdfsan-llvm-project.git
+       url = https://github.com/vusec/kdfsan-llvm-project.git
        branch = kasper-llvm-v11
 [submodule "kdfsan-syzkaller"]
        path = kdfsan-syzkaller
-       url = [email protected]:vusec/kdfsan-syzkaller.git
+       url = https://github.com/vusec/kdfsan-syzkaller.git
        branch = kasper-syzkaller
 [submodule "kasper-results"]
        path = kasper-results
-       url = [email protected]:vusec/kasper-results.git
+       url = https://github.com/vusec/kasper-results.git
        branch = main

If the problem persists, make sure to remove the submodule entries from .git/config before running task update.

Failed to run task "kernel:bzImage"

Following the readme on a freshly installed Ubuntu 20.04.05 gives me a "Failed to run task "kernel:bzImage".
Here is the output from running the task:

task: [kernel:config] cd $KERNEL && make LLVM=1 LLVM_IAS=1 CC=$CLANG LD=$LD AR=$LLVM_AR NM=$LLVM_NM STRIP=$LLVM_STRIP OBJCOPY=$LLVM_OBJCOPY OBJDUMP=$LLVM_OBJDUMP READELF=$LLVM_READELF HOSTCC=$CLANG HOSTCXX=$CXX HOSTAR=$LLVM_AR HOSTLD=$LD defconfig
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_JUMP_LABEL
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_UNWINDER_FRAME_POINTER
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_KALLSYMS_ALL
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_RANDOMIZE_BASE
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_PREEMPT_VOLUNTARY
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_SMP
task: [kernel:config] cd ${KERNEL} && scripts/config --set-val CONFIG_NR_CPUS 1
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_HZ_1000
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_HZ_100
task: [kernel:config] cd ${KERNEL} && scripts/config --set-val CONFIG_HZ 100
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_HIGH_RES_TIMERS
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_LTO_NONE
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_LTO_CLANG_THIN
task: [kernel:config] \[ -z "$ENABLE_GDB_BUILD" \] || task kernel:config-gdb-build
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_X86_X2APIC
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_X86_LOCAL_APIC
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_HYPERVISOR_GUEST
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_KVM_GUEST
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_PARAVIRT
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_HAVE_STATIC_CALL
task: [kernel:config] \[ -z "$ENABLE_KSPECEM" \] ||    task kernel:config-kspecem
task: [kernel:config-kspecem] cd $KERNEL && scripts/config --enable CONFIG_KSPECEM
task: [kernel:config] \[ -z "$ENABLE_KDFSAN" \] ||    task kernel:config-kdfsan
task: [kernel:config-kdfsan] cd $KERNEL && scripts/config --enable CONFIG_KDFSAN
task: [kernel:config] \[ -z "$ENABLE_KASAN" \] ||     task kernel:config-kasan
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_VMAP_STACK
task: [kernel:config-kasan] cd $KERNEL && scripts/config --enable CONFIG_KASAN
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_EXTRA
task: [kernel:config-kasan] cd $KERNEL && scripts/config --enable CONFIG_KASAN_OUTLINE
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_INLINE
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_TEST_KASAN
task: [kernel:config-kasan] cd $KERNEL && scripts/config --enable CONFIG_KASAN_STACK_ENABLE
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_VMALLOC
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_MODULE_TEST
task: [kernel:config] \[ -z "$ENABLE_DEBUG" \] ||     task kernel:config-debug
task: [kernel:config-debug] cd $KERNEL && scripts/config --enable CONFIG_DEBUG_INFO
task: [kernel:config-debug] cd $KERNEL && scripts/config --enable CONFIG_DEBUG_INFO_REDUCED
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_COMPRESSED
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_SPLIT
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_DWARF4
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_DWARF5
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_GDB_SCRIPTS
task: [kernel:config-debug] cd $KERNEL && scripts/config --enable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
task: [kernel:config] \[ -z "$ENABLE_SYZKALLER" \] || task kernel:config-syzkaller
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_KCOV
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_KCOV_INSTRUMENT_ALL
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_KCOV_ENABLE_COMPARISONS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_CONFIGFS_FS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_SECURITYFS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_NVME_TARGET
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_NETCONSOLE_DYNAMIC
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_OCFS2_FS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_DLM
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --set-val CONFIG_KCOV_IRQ_AREA_SIZE 0x40000
task: [kernel:config] cd $KERNEL && yes "" | make -j${NPROC} LLVM=1 LLVM_IAS=1 CC=$CLANG LD=$LD AR=$LLVM_AR NM=$LLVM_NM STRIP=$LLVM_STRIP OBJCOPY=$LLVM_OBJCOPY OBJDUMP=$LLVM_OBJDUMP READELF=$LLVM_READELF HOSTCC=$CLANG HOSTCXX=$CXX HOSTAR=$LLVM_AR HOSTLD=$LD modules_prepare
  SYNC    include/config/auto.conf.cmd
.config:4758:warning: override: UNWINDER_FRAME_POINTER changes choice state
*
* Restart config...
*
*
* Linux guest support
*
Linux guest support (HYPERVISOR_GUEST) [Y/n/?] y
  Enable paravirtualization code (PARAVIRT) [Y/n/?] y
  paravirt-ops debugging (PARAVIRT_DEBUG) [N/y/?] (NEW) 
  Xen guest support (XEN) [N/y/?] (NEW) 
  KVM Guest support (including kvmclock) (KVM_GUEST) [Y/n/?] y
  Disable host haltpoll when loading haltpoll driver (ARCH_CPUIDLE_HALTPOLL) [Y/?] (NEW) y
  Support for running PVH guests (PVH) [N/y/?] (NEW) 
  Paravirtual steal time accounting (PARAVIRT_TIME_ACCOUNTING) [N/y/?] (NEW) 
  Jailhouse non-root cell support (JAILHOUSE_GUEST) [N/y/?] (NEW) 
  ACRN Guest support (ACRN_GUEST) [N/y/?] (NEW) 
*
* CPU Frequency scaling
*
CPU Frequency scaling (CPU_FREQ) [Y/n/?] y
  CPU frequency transition statistics (CPU_FREQ_STAT) [N/y/?] n
  Default CPUFreq governor
    1. performance (CPU_FREQ_DEFAULT_GOV_PERFORMANCE)
    2. powersave (CPU_FREQ_DEFAULT_GOV_POWERSAVE)
  > 3. userspace (CPU_FREQ_DEFAULT_GOV_USERSPACE)
    4. ondemand (CPU_FREQ_DEFAULT_GOV_ONDEMAND) (NEW)
    5. conservative (CPU_FREQ_DEFAULT_GOV_CONSERVATIVE) (NEW)
  choice[1-5?]: 
  'performance' governor (CPU_FREQ_GOV_PERFORMANCE) [Y/?] y
  'powersave' governor (CPU_FREQ_GOV_POWERSAVE) [N/m/y/?] n
  'userspace' governor for userspace frequency scaling (CPU_FREQ_GOV_USERSPACE) [Y/?] y
  'ondemand' cpufreq policy governor (CPU_FREQ_GOV_ONDEMAND) [Y/n/m/?] y
  'conservative' cpufreq governor (CPU_FREQ_GOV_CONSERVATIVE) [N/m/y/?] n
  *
  * CPU frequency scaling drivers
  *
  Intel P state control (X86_INTEL_PSTATE) [Y/n/?] y
  Processor Clocking Control interface driver (X86_PCC_CPUFREQ) [N/m/y/?] n
  ACPI Processor P-States driver (X86_ACPI_CPUFREQ) [Y/n/m/?] y
    Legacy cpb sysfs knob support for AMD CPUs (X86_ACPI_CPUFREQ_CPB) [Y/n/?] y
  AMD Opteron/Athlon64 PowerNow! (X86_POWERNOW_K8) [N/m/y/?] n
  AMD frequency sensitivity feedback powersave bias (X86_AMD_FREQ_SENSITIVITY) [N/m/y/?] n
  Intel Enhanced SpeedStep (deprecated) (X86_SPEEDSTEP_CENTRINO) [N/m/y/?] n
  Intel Pentium 4 clock modulation (X86_P4_CLOCKMOD) [N/m/y/?] n
  *
  * shared options
  *
*
* CPU Idle
*
CPU idle PM support (CPU_IDLE) [Y/?] y
  Ladder governor (for periodic timer tick) (CPU_IDLE_GOV_LADDER) [N/y/?] n
  Menu governor (for tickless system) (CPU_IDLE_GOV_MENU) [Y/?] y
  Timer events oriented (TEO) governor (for tickless systems) (CPU_IDLE_GOV_TEO) [N/y/?] n
  Haltpoll governor (for virtualized systems) (CPU_IDLE_GOV_HALTPOLL) [N/y/?] (NEW) 
  Halt poll cpuidle driver (HALTPOLL_CPUIDLE) [Y/n/m/?] (NEW) 
*
* Mice
*
Mice (INPUT_MOUSE) [Y/n/?] y
  PS/2 mouse (MOUSE_PS2) [Y/n/m/?] y
    Elantech PS/2 protocol extension (MOUSE_PS2_ELANTECH) [N/y/?] n
    Sentelic Finger Sensing Pad PS/2 protocol extension (MOUSE_PS2_SENTELIC) [N/y/?] n
    eGalax TouchKit PS/2 protocol extension (MOUSE_PS2_TOUCHKIT) [N/y/?] n
    Virtual mouse (vmmouse) (MOUSE_PS2_VMMOUSE) [N/y/?] (NEW) 
  Serial mouse (MOUSE_SERIAL) [N/m/y/?] n
  Apple USB Touchpad support (MOUSE_APPLETOUCH) [N/m/y/?] n
  Apple USB BCM5974 Multitouch trackpad support (MOUSE_BCM5974) [N/m/y/?] n
  Cypress APA I2C Trackpad support (MOUSE_CYAPA) [N/m/y/?] n
  ELAN I2C Touchpad support (MOUSE_ELAN_I2C) [N/m/y/?] n
  DEC VSXXX-AA/GA mouse and VSXXX-AB tablet (MOUSE_VSXXXAA) [N/m/y/?] n
  Synaptics I2C Touchpad support (MOUSE_SYNAPTICS_I2C) [N/m/y/?] n
  Synaptics USB device support (MOUSE_SYNAPTICS_USB) [N/m/y/?] n
*
* PTP clock support
*
PTP clock support (PTP_1588_CLOCK) [Y/n/m/?] y
*
* Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
*
KVM virtual PTP clock (PTP_1588_CLOCK_KVM) [Y/n/m/?] (NEW) 
IDT 82P33xxx PTP clock (PTP_1588_CLOCK_IDT82P33) [N/m/y/?] n
IDT CLOCKMATRIX as PTP clock (PTP_1588_CLOCK_IDTCM) [N/m/y/?] n
VMware virtual PTP clock (PTP_1588_CLOCK_VMW) [N/m/y/?] (NEW) 
OpenCompute TimeCard as PTP clock (PTP_1588_CLOCK_OCP) [N/m/y/?] n
*
* Microsoft Hyper-V guest support
*
Microsoft Hyper-V client drivers (HYPERV) [N/m/y/?] (NEW) 
*
* MOST support
*
MOST support (MOST) [N/m/y/?] (NEW) 
*
* Library routines
*
Generic bitfield packing and unpacking (PACKING) [N/y/?] n
CORDIC algorithm (CORDIC) [N/m/y/?] n
Simple prime number generator for testing (PRIME_NUMBERS) [N/m/y/?] n
CRC-CCITT functions (CRC_CCITT) [Y/?] y
CRC16 functions (CRC16) [Y/?] y
CRC calculation for the T10 Data Integrity Field (CRC_T10DIF) [N/m/y/?] n
CRC ITU-T V.41 functions (CRC_ITU_T) [N/m/y/?] n
CRC32/CRC32c functions (CRC32) [Y/?] y
  CRC32 perform self test on init (CRC32_SELFTEST) [N/m/y/?] n
  CRC32 implementation
  > 1. Slice by 8 bytes (CRC32_SLICEBY8)
    2. Slice by 4 bytes (CRC32_SLICEBY4)
    3. Sarwate's Algorithm (one byte at a time) (CRC32_SARWATE)
    4. Classic Algorithm (one bit at a time) (CRC32_BIT)
  choice[1-4?]: 1
CRC64 functions (CRC64) [N/m/y/?] n
CRC4 functions (CRC4) [N/m/y/?] n
CRC7 functions (CRC7) [N/m/y/?] n
CRC32c (Castagnoli, et al) Cyclic Redundancy-Check (LIBCRC32C) [N/m/y/?] n
CRC8 function (CRC8) [N/m/y/?] n
PRNG perform self test on init (RANDOM32_SELFTEST) [N/y/?] n
XZ decompression support (XZ_DEC) [Y/?] y
XZ decompressor tester (XZ_DEC_TEST) [N/m/y/?] n
Enable debugging of DMA-API usage (DMA_API_DEBUG) [N/y/?] n
Enable benchmarking of streaming DMA mapping (DMA_MAP_BENCHMARK) [N/y/?] n
glob self-test on init (GLOB_SELFTEST) [N/m/y/?] n
IRQ polling library (IRQ_POLL) [N/y/?] n
Select compiled-in fonts (FONTS) [N/y/?] n
stack depot hash size (12 => 4KB, 20 => 1024KB) (STACK_HASH_ORDER) [20] (NEW) 
Test string functions (STRING_SELFTEST) [N/m/y/?] n
*
* Memory Debugging
*
Extend memmap on extra space for more information on page (PAGE_EXTENSION) [N/y/?] n
Debug page memory allocations (DEBUG_PAGEALLOC) [N/y/?] n
Track page owner (PAGE_OWNER) [N/y/?] n
Poison pages after freeing (PAGE_POISONING) [N/y/?] n
Enable tracepoint to track down page reference manipulation (DEBUG_PAGE_REF) [N/y/?] n
Testcase for the marking rodata read-only (DEBUG_RODATA_TEST) [N/y/?] n
Warn on W+X mappings at boot (DEBUG_WX) [N/y/?] n
Export kernel pagetable layout to userspace via debugfs (PTDUMP_DEBUGFS) [N/y/?] n
Debug object operations (DEBUG_OBJECTS) [N/y/?] n
Debug slab memory allocations (DEBUG_SLAB) [N/y/?] (NEW) 
Kernel memory leak detector (DEBUG_KMEMLEAK) [N/y/?] n
Stack utilization instrumentation (DEBUG_STACK_USAGE) [Y/n/?] y
Detect stack corruption on calls to schedule() (SCHED_STACK_END_CHECK) [N/y/?] n
Debug VM (DEBUG_VM) [N/y/?] n
Debug arch page table for semantics compliance (DEBUG_VM_PGTABLE) [N/y/?] n
Debug VM translations (DEBUG_VIRTUAL) [N/y/?] n
Enforce kmap_local temporary mappings (DEBUG_KMAP_LOCAL_FORCE_MAP) [N/y/?] n
*
* KASAN: runtime memory debugger
*
KASAN: runtime memory debugger (KASAN) [Y/n/?] y
  KASAN mode
  > 1. Generic mode (KASAN_GENERIC) (NEW)
  choice[1]: 1
  Instrumentation type
  > 1. Outline instrumentation (KASAN_OUTLINE)
    2. Inline instrumentation (KASAN_INLINE)
  choice[1-2?]: 1
  Enable stack instrumentation (unsafe) (KASAN_STACK_ENABLE) [Y/n/?] y
  Back mappings in vmalloc space with real shadow memory (KASAN_VMALLOC) [N/y/?] n
  KUnit-incompatible tests of KASAN bug detection capabilities (KASAN_MODULE_TEST) [N/m/?] n
DataFlowSanitizer : generalised dynamic data flow analysis (KDFSAN) [Y/n/?] y
kspecem: add checkpointing support (KSPECEM) [Y/n/?] y
  DESCEND  objtool
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
task: [build] mkdir -p ${ROOT}/build
task: [build] cd ${ROOT}/build && cmake ..
-- Using LLVM version 11.1.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kasper/kasper/build
task: [build] cd ${ROOT}/build && make -j${NPROC}
[  6%] Built target LLVMKSpecEmPfCheckerPass
[ 13%] Built target LLVMKSpecEmPass
[ 20%] Built target LLVMCountInstrsPass
[ 26%] Built target LLVMKSpecEmCheckSpecLengthPass
[ 33%] Built target LLVMKSpecEmSpecPass
Scanning dependencies of target kspecem
[ 36%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_bugs.c.o
[ 40%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_assert.c.o
[ 43%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_init.c.o
[ 46%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_common.c.o
[ 50%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_interface.c.o
[ 53%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_stack.c.o
[ 56%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_interrupt.c.o
[ 60%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_kdf.c.o
[ 63%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_registers.c.o
[ 66%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_internal.c.o
[ 70%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_statistics.c.o
[ 73%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_report.c.o
[ 76%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_stats_inlineasm.c.o
[ 80%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_stats_restarts.c.o
[ 83%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_utils.c.o
[ 86%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_undolog.c.o
/home/kasper/kasper/static/kspecem/kspecem_interface.c:48:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:28:19: note: expanded from macro 'ENTER_KSPECEM_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:89:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:28:19: note: expanded from macro 'ENTER_KSPECEM_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:100:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:28:19: note: expanded from macro 'ENTER_KSPECEM_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:123:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_NONMI_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:37:19: note: expanded from macro 'ENTER_KSPECEM_NONMI_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:132:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:28:19: note: expanded from macro 'ENTER_KSPECEM_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:167:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_NONMI_RT(); /* stop_nmi could call this hook (TODO: double-check this) */
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:37:19: note: expanded from macro 'ENTER_KSPECEM_NONMI_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:175:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_NONMI_RT(); /* stop_nmi could call this hook (TODO: double-check this) */
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:37:19: note: expanded from macro 'ENTER_KSPECEM_NONMI_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:182:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_NONMI_RT(); /* stop_nmi could call this hook (TODO: double-check this) */
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:37:19: note: expanded from macro 'ENTER_KSPECEM_NONMI_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:189:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_NONMI_RT(); /* stop_nmi could call this hook (TODO: double-check this) */
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:37:19: note: expanded from macro 'ENTER_KSPECEM_NONMI_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:197:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:28:19: note: expanded from macro 'ENTER_KSPECEM_RT'
    unsigned long __irq_flags; \
                  ^
/home/kasper/kasper/static/kspecem/kspecem_interface.c:217:3: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
  ENTER_KSPECEM_NONMI_RT();
  ^
/home/kasper/kasper/static/kspecem/./include/kspecem_interface.h:37:19: note: expanded from macro 'ENTER_KSPECEM_NONMI_RT'
    unsigned long __irq_flags; \
                  ^
[ 90%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_whitelist.c.o
[ 93%] Building C object static/kspecem/CMakeFiles/kspecem.dir/kspecem_pf_checker.c.o
11 warnings generated.
[ 96%] Linking C static library libkspecem.a
[100%] Built target kspecem
task: [kernel:bzImage] cd $KERNEL && make -j${NPROC} LLVM=1 LLVM_IAS=1 CC=$CLANG LD=$LD AR=$LLVM_AR NM=$LLVM_NM STRIP=$LLVM_STRIP OBJCOPY=$LLVM_OBJCOPY OBJDUMP=$LLVM_OBJDUMP READELF=$LLVM_READELF HOSTCC=$CLANG HOSTCXX=$CXX HOSTAR=$LLVM_AR HOSTLD=$LD bzImage
  DESCEND  objtool
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  GEN     .tmp_initcalls.lds
./scripts/generate_initcall_order.pl: ERROR: file .//home/kasper/kasper/build/static/kspecem/libkspecem.a doesn't exist? at ./scripts/generate_initcall_order.pl line 100.
  LTO     vmlinux.o
  OBJTOOL vmlinux.o
Killed
make: *** [Makefile:1219: vmlinux] Error 137
task: Failed to run task "kernel:bzImage": exit status 2

It looks like it fails because of this error: ./scripts/generate_initcall_order.pl: ERROR: file .//home/kasper/kasper/build/static/kspecem/libkspecem.a doesn't exist? at ./scripts/generate_initcall_order.pl line 100.
The missing file .//home/kasper/kasper/build/static/kspecem/libkspecem.a looks like a broken path (it's an absolute path but there is a leading ./. But the mentioned file does also not exist after correcting the path and I cannot figure out where this file is supposed to be created and where the leading ./ comes from.

Failed to run task "initramfs:create"

Creating the initramfs on a freshly installed Ubuntu 20.04.5 fails:

~/kasper$ task initramfs:create
task: [initramfs:create] cd out && curl https://busybox.net/downloads/busybox-1.33.0.tar.bz2 | tar xjf -
task: Failed to run task "initramfs:create": exit status 1

It seems like the folder out is expected to exist but missing. Creating it by hand and rerunning task initramfs:create solves the problem.

Failed to run task "kernel:config build"

Failed to run task "build", maybe the command "make" go wrong
here is the output:

task: [kernel:config] cd $KERNEL && make LLVM=1 LLVM_IAS=1 CC=$CLANG LD=$LD AR=$LLVM_AR NM=$LLVM_NM STRIP=$LLVM_STRIP OBJCOPY=$LLVM_OBJCOPY OBJDUMP=$LLVM_OBJDUMP READELF=$LLVM_READELF HOSTCC=$CLANG HOSTCXX=$CXX HOSTAR=$LLVM_AR HOSTLD=$LD defconfig
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_JUMP_LABEL
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_UNWINDER_FRAME_POINTER
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_KALLSYMS_ALL
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_RANDOMIZE_BASE
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_PREEMPT_VOLUNTARY
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_SMP
task: [kernel:config] cd ${KERNEL} && scripts/config --set-val CONFIG_NR_CPUS 1
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_HZ_1000
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_HZ_100
task: [kernel:config] cd ${KERNEL} && scripts/config --set-val CONFIG_HZ 100
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_HIGH_RES_TIMERS
task: [kernel:config] cd ${KERNEL} && scripts/config --disable CONFIG_LTO_NONE
task: [kernel:config] cd ${KERNEL} && scripts/config --enable CONFIG_LTO_CLANG_THIN
task: [kernel:config] \[ -z "$ENABLE_GDB_BUILD" \] || task kernel:config-gdb-build
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_X86_X2APIC
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_X86_LOCAL_APIC
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_HYPERVISOR_GUEST
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_KVM_GUEST
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_PARAVIRT
task: [kernel:config-gdb-build] cd ${KERNEL} && scripts/config --enable CONFIG_HAVE_STATIC_CALL
task: [kernel:config] \[ -z "$ENABLE_KSPECEM" \] ||    task kernel:config-kspecem
task: [kernel:config-kspecem] cd $KERNEL && scripts/config --enable CONFIG_KSPECEM
task: [kernel:config] \[ -z "$ENABLE_KDFSAN" \] ||    task kernel:config-kdfsan
task: [kernel:config-kdfsan] cd $KERNEL && scripts/config --enable CONFIG_KDFSAN
task: [kernel:config] \[ -z "$ENABLE_KASAN" \] ||     task kernel:config-kasan
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_VMAP_STACK
task: [kernel:config-kasan] cd $KERNEL && scripts/config --enable CONFIG_KASAN
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_EXTRA
task: [kernel:config-kasan] cd $KERNEL && scripts/config --enable CONFIG_KASAN_OUTLINE
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_INLINE
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_TEST_KASAN
task: [kernel:config-kasan] cd $KERNEL && scripts/config --enable CONFIG_KASAN_STACK_ENABLE
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_VMALLOC
task: [kernel:config-kasan] cd $KERNEL && scripts/config --disable CONFIG_KASAN_MODULE_TEST
task: [kernel:config] \[ -z "$ENABLE_DEBUG" \] ||     task kernel:config-debug
task: [kernel:config-debug] cd $KERNEL && scripts/config --enable CONFIG_DEBUG_INFO
task: [kernel:config-debug] cd $KERNEL && scripts/config --enable CONFIG_DEBUG_INFO_REDUCED
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_COMPRESSED
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_SPLIT
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_DWARF4
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_DEBUG_INFO_DWARF5
task: [kernel:config-debug] cd $KERNEL && scripts/config --disable CONFIG_GDB_SCRIPTS
task: [kernel:config-debug] cd $KERNEL && scripts/config --enable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
task: [kernel:config] \[ -z "$ENABLE_SYZKALLER" \] || task kernel:config-syzkaller
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_KCOV
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_KCOV_INSTRUMENT_ALL
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_KCOV_ENABLE_COMPARISONS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_CONFIGFS_FS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --enable CONFIG_SECURITYFS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_NVME_TARGET
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_NETCONSOLE_DYNAMIC
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_OCFS2_FS
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --disable CONFIG_DLM
task: [kernel:config-syzkaller] cd $KERNEL && scripts/config --set-val CONFIG_KCOV_IRQ_AREA_SIZE 0x40000
task: [kernel:config] cd $KERNEL && yes "" | make -j${NPROC} LLVM=1 LLVM_IAS=1 CC=$CLANG LD=$LD AR=$LLVM_AR NM=$LLVM_NM STRIP=$LLVM_STRIP OBJCOPY=$LLVM_OBJCOPY OBJDUMP=$LLVM_OBJDUMP READELF=$LLVM_READELF HOSTCC=$CLANG HOSTCXX=$CXX HOSTAR=$LLVM_AR HOSTLD=$LD modules_prepare
  SYNC    include/config/auto.conf.cmd
.config:4758:warning: override: UNWINDER_FRAME_POINTER changes choice state
*
* Restart config...
*
*
* Linux guest support
*
Linux guest support (HYPERVISOR_GUEST) [Y/n/?] y
  Enable paravirtualization code (PARAVIRT) [Y/n/?] y
  paravirt-ops debugging (PARAVIRT_DEBUG) [N/y/?] (NEW) 
  Xen guest support (XEN) [N/y/?] (NEW) 
  KVM Guest support (including kvmclock) (KVM_GUEST) [Y/n/?] y
  Disable host haltpoll when loading haltpoll driver (ARCH_CPUIDLE_HALTPOLL) [Y/?] (NEW) y
  Support for running PVH guests (PVH) [N/y/?] (NEW) 
  Paravirtual steal time accounting (PARAVIRT_TIME_ACCOUNTING) [N/y/?] (NEW) 
  Jailhouse non-root cell support (JAILHOUSE_GUEST) [N/y/?] (NEW) 
  ACRN Guest support (ACRN_GUEST) [N/y/?] (NEW) 
*
* CPU Frequency scaling
*
CPU Frequency scaling (CPU_FREQ) [Y/n/?] y
  CPU frequency transition statistics (CPU_FREQ_STAT) [N/y/?] n
  Default CPUFreq governor
    1. performance (CPU_FREQ_DEFAULT_GOV_PERFORMANCE)
    2. powersave (CPU_FREQ_DEFAULT_GOV_POWERSAVE)
  > 3. userspace (CPU_FREQ_DEFAULT_GOV_USERSPACE)
    4. ondemand (CPU_FREQ_DEFAULT_GOV_ONDEMAND) (NEW)
    5. conservative (CPU_FREQ_DEFAULT_GOV_CONSERVATIVE) (NEW)
  choice[1-5?]: 
  'performance' governor (CPU_FREQ_GOV_PERFORMANCE) [Y/?] y
  'powersave' governor (CPU_FREQ_GOV_POWERSAVE) [N/m/y/?] n
  'userspace' governor for userspace frequency scaling (CPU_FREQ_GOV_USERSPACE) [Y/?] y
  'ondemand' cpufreq policy governor (CPU_FREQ_GOV_ONDEMAND) [Y/n/m/?] y
  'conservative' cpufreq governor (CPU_FREQ_GOV_CONSERVATIVE) [N/m/y/?] n
  *
  * CPU frequency scaling drivers
  *
  Intel P state control (X86_INTEL_PSTATE) [Y/n/?] y
  Processor Clocking Control interface driver (X86_PCC_CPUFREQ) [N/m/y/?] n
  ACPI Processor P-States driver (X86_ACPI_CPUFREQ) [Y/n/m/?] y
    Legacy cpb sysfs knob support for AMD CPUs (X86_ACPI_CPUFREQ_CPB) [Y/n/?] y
  AMD Opteron/Athlon64 PowerNow! (X86_POWERNOW_K8) [N/m/y/?] n
  AMD frequency sensitivity feedback powersave bias (X86_AMD_FREQ_SENSITIVITY) [N/m/y/?] n
  Intel Enhanced SpeedStep (deprecated) (X86_SPEEDSTEP_CENTRINO) [N/m/y/?] n
  Intel Pentium 4 clock modulation (X86_P4_CLOCKMOD) [N/m/y/?] n
  *
  * shared options
  *
*
* CPU Idle
*
CPU idle PM support (CPU_IDLE) [Y/?] y
  Ladder governor (for periodic timer tick) (CPU_IDLE_GOV_LADDER) [N/y/?] n
  Menu governor (for tickless system) (CPU_IDLE_GOV_MENU) [Y/?] y
  Timer events oriented (TEO) governor (for tickless systems) (CPU_IDLE_GOV_TEO) [N/y/?] n
  Haltpoll governor (for virtualized systems) (CPU_IDLE_GOV_HALTPOLL) [N/y/?] (NEW) 
  Halt poll cpuidle driver (HALTPOLL_CPUIDLE) [Y/n/m/?] (NEW) 
*
* Mice
*
Mice (INPUT_MOUSE) [Y/n/?] y
  PS/2 mouse (MOUSE_PS2) [Y/n/m/?] y
    Elantech PS/2 protocol extension (MOUSE_PS2_ELANTECH) [N/y/?] n
    Sentelic Finger Sensing Pad PS/2 protocol extension (MOUSE_PS2_SENTELIC) [N/y/?] n
    eGalax TouchKit PS/2 protocol extension (MOUSE_PS2_TOUCHKIT) [N/y/?] n
    Virtual mouse (vmmouse) (MOUSE_PS2_VMMOUSE) [N/y/?] (NEW) 
  Serial mouse (MOUSE_SERIAL) [N/m/y/?] n
  Apple USB Touchpad support (MOUSE_APPLETOUCH) [N/m/y/?] n
  Apple USB BCM5974 Multitouch trackpad support (MOUSE_BCM5974) [N/m/y/?] n
  Cypress APA I2C Trackpad support (MOUSE_CYAPA) [N/m/y/?] n
  ELAN I2C Touchpad support (MOUSE_ELAN_I2C) [N/m/y/?] n
  DEC VSXXX-AA/GA mouse and VSXXX-AB tablet (MOUSE_VSXXXAA) [N/m/y/?] n
  Synaptics I2C Touchpad support (MOUSE_SYNAPTICS_I2C) [N/m/y/?] n
  Synaptics USB device support (MOUSE_SYNAPTICS_USB) [N/m/y/?] n
*
* PTP clock support
*
PTP clock support (PTP_1588_CLOCK) [Y/n/m/?] y
*
* Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
*
KVM virtual PTP clock (PTP_1588_CLOCK_KVM) [Y/n/m/?] (NEW) 
IDT 82P33xxx PTP clock (PTP_1588_CLOCK_IDT82P33) [N/m/y/?] n
IDT CLOCKMATRIX as PTP clock (PTP_1588_CLOCK_IDTCM) [N/m/y/?] n
VMware virtual PTP clock (PTP_1588_CLOCK_VMW) [N/m/y/?] (NEW) 
OpenCompute TimeCard as PTP clock (PTP_1588_CLOCK_OCP) [N/m/y/?] n
*
* Microsoft Hyper-V guest support
*
Microsoft Hyper-V client drivers (HYPERV) [N/m/y/?] (NEW) 
*
* MOST support
*
MOST support (MOST) [N/m/y/?] (NEW) 
*
* Library routines
*
Generic bitfield packing and unpacking (PACKING) [N/y/?] n
CORDIC algorithm (CORDIC) [N/m/y/?] n
Simple prime number generator for testing (PRIME_NUMBERS) [N/m/y/?] n
CRC-CCITT functions (CRC_CCITT) [Y/?] y
CRC16 functions (CRC16) [Y/?] y
CRC calculation for the T10 Data Integrity Field (CRC_T10DIF) [N/m/y/?] n
CRC ITU-T V.41 functions (CRC_ITU_T) [N/m/y/?] n
CRC32/CRC32c functions (CRC32) [Y/?] y
  CRC32 perform self test on init (CRC32_SELFTEST) [N/m/y/?] n
  CRC32 implementation
  > 1. Slice by 8 bytes (CRC32_SLICEBY8)
    2. Slice by 4 bytes (CRC32_SLICEBY4)
    3. Sarwate's Algorithm (one byte at a time) (CRC32_SARWATE)
    4. Classic Algorithm (one bit at a time) (CRC32_BIT)
  choice[1-4?]: 1
CRC64 functions (CRC64) [N/m/y/?] n
CRC4 functions (CRC4) [N/m/y/?] n
CRC7 functions (CRC7) [N/m/y/?] n
CRC32c (Castagnoli, et al) Cyclic Redundancy-Check (LIBCRC32C) [N/m/y/?] n
CRC8 function (CRC8) [N/m/y/?] n
PRNG perform self test on init (RANDOM32_SELFTEST) [N/y/?] n
XZ decompression support (XZ_DEC) [Y/?] y
XZ decompressor tester (XZ_DEC_TEST) [N/m/y/?] n
Enable debugging of DMA-API usage (DMA_API_DEBUG) [N/y/?] n
Enable benchmarking of streaming DMA mapping (DMA_MAP_BENCHMARK) [N/y/?] n
glob self-test on init (GLOB_SELFTEST) [N/m/y/?] n
IRQ polling library (IRQ_POLL) [N/y/?] n
Select compiled-in fonts (FONTS) [N/y/?] n
stack depot hash size (12 => 4KB, 20 => 1024KB) (STACK_HASH_ORDER) [20] (NEW) 
Test string functions (STRING_SELFTEST) [N/m/y/?] n
*
* Memory Debugging
*
Extend memmap on extra space for more information on page (PAGE_EXTENSION) [N/y/?] n
Debug page memory allocations (DEBUG_PAGEALLOC) [N/y/?] n
Track page owner (PAGE_OWNER) [N/y/?] n
Poison pages after freeing (PAGE_POISONING) [N/y/?] n
Enable tracepoint to track down page reference manipulation (DEBUG_PAGE_REF) [N/y/?] n
Testcase for the marking rodata read-only (DEBUG_RODATA_TEST) [N/y/?] n
Warn on W+X mappings at boot (DEBUG_WX) [N/y/?] n
Export kernel pagetable layout to userspace via debugfs (PTDUMP_DEBUGFS) [N/y/?] n
Debug object operations (DEBUG_OBJECTS) [N/y/?] n
Debug slab memory allocations (DEBUG_SLAB) [N/y/?] (NEW) 
Kernel memory leak detector (DEBUG_KMEMLEAK) [N/y/?] n
Stack utilization instrumentation (DEBUG_STACK_USAGE) [Y/n/?] y
Detect stack corruption on calls to schedule() (SCHED_STACK_END_CHECK) [N/y/?] n
Debug VM (DEBUG_VM) [N/y/?] n
Debug arch page table for semantics compliance (DEBUG_VM_PGTABLE) [N/y/?] n
Debug VM translations (DEBUG_VIRTUAL) [N/y/?] n
Enforce kmap_local temporary mappings (DEBUG_KMAP_LOCAL_FORCE_MAP) [N/y/?] n
*
* KASAN: runtime memory debugger
*
KASAN: runtime memory debugger (KASAN) [Y/n/?] y
  KASAN mode
  > 1. Generic mode (KASAN_GENERIC) (NEW)
  choice[1]: 1
  Instrumentation type
  > 1. Outline instrumentation (KASAN_OUTLINE)
    2. Inline instrumentation (KASAN_INLINE)
  choice[1-2?]: 1
  Enable stack instrumentation (unsafe) (KASAN_STACK_ENABLE) [Y/n/?] y
  Back mappings in vmalloc space with real shadow memory (KASAN_VMALLOC) [N/y/?] n
  KUnit-incompatible tests of KASAN bug detection capabilities (KASAN_MODULE_TEST) [N/m/?] n
DataFlowSanitizer : generalised dynamic data flow analysis (KDFSAN) [Y/n/?] y
kspecem: add checkpointing support (KSPECEM) [Y/n/?] y
  DESCEND  objtool
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
task: [build] mkdir -p ${ROOT}/build
task: [build] cd ${ROOT}/build && cmake ..
-- Using LLVM version 11.1.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zyz/secure/kasper/kasper/build
task: [build] cd ${ROOT}/build && make -j${NPROC}
make: *** No targets specified and no makefile found.  Stop.
task: Failed to run task "build": exit status 2

Conflicting required go versions

Hello,

I'm a PhD student in computer science at Carnegie Mellon University. I'm trying to run Kasper by following your readme. I installed go 1.15.15 as per readme, but it seems that syzkaller now requires newer go versions. I tried newer go versions, but other errors were thrown. The error log is attached. Please advise.

Best,
Kaiyang Zhao

kaiyang2@entropy /d/k/kasper ❯❯❯ go version
go version go1.15.15 linux/amd64
kaiyang2@entropy /d/k/kasper ❯❯❯ task syzkaller:build
task: [syzkaller:build] go get github.com/cbroglie/mustache/...
go: downloading github.com/cbroglie/mustache v1.4.0
go: found github.com/cbroglie/mustache/... in github.com/cbroglie/mustache v1.4.0
go: downloading github.com/spf13/cobra v1.7.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/inconshreveable/mousetrap v1.1.0
task: [syzkaller:build] echo "KERNEL: $KERNEL
SYZKALLER_PREFIX: $SYZKALLER_PREFIX
SYZKALLER_WORKDIR: /data/kaiyang/kasper/out/syzkaller-workdir
SYZKALLER_IMG: $SYZKALLER_IMG
SYZKALLER_LOGS_PATH: $SYZKALLER_LOGS_PATH" | $GOPATH/bin/mustache $ROOT/syzkaller.cfg.template > $SYZKALLER_CFG
task: [syzkaller:build] mkdir -p $ROOT/out/go/src/github.com/google
task: [syzkaller:build] ln -sfn $SYZKALLER_PREFIX $ROOT/out/go/src/github.com/google/syzkaller
task: [syzkaller:build] cd $SYZKALLER_PREFIX && make
go: downloading github.com/google/syzkaller v0.0.0-20230726144346-41fe1bae463b
go: downloading golang.org/x/sys v0.10.0
# github.com/google/syzkaller/pkg/image
../out/go/pkg/mod/github.com/google/[email protected]/pkg/image/compression.go:39:26: undefined: io.Discard
../out/go/pkg/mod/github.com/google/[email protected]/pkg/image/compression.go:60:18: undefined: io.ReadAll
note: module requires Go 1.19
# golang.org/x/sys/unix
../out/go/pkg/mod/golang.org/x/[email protected]/unix/mremap.go:33:10: undefined: unsafe.Slice
../out/go/pkg/mod/golang.org/x/[email protected]/unix/syscall.go:83:16: undefined: unsafe.Slice
../out/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:1018:20: undefined: unsafe.Slice
../out/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:2316:9: undefined: unsafe.Slice
../out/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
../out/go/pkg/mod/golang.org/x/[email protected]/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice
note: module requires Go 1.17
Makefile:35: *** syz-env failed.  Stop.
task: Failed to run task "syzkaller:build": exit status 2

Great work guys! One thing to n

Great work guys! One thing to note when you grab the repo the Stretch image is out of date so need to query archived branch to build the image or use a different branch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.