Skip to content

Commit ac19154

Browse files
committed
Use rustc directly instead of cargo
This is a big PR, but most of it is interdependent to the rest. - Shared Rust infrastructure: `libkernel`, `libmodule`, `libcore`, `liballoc`, `libcompiler_builtins`. + The Rust modules are now much smaller since they do not contain several copies of those libraries. Our example `.ko` on release is just 12 KiB, down from 1.3 MiB. For reference: `vmlinux` on release w/ Rust is 23 MiB (compressed: 2.1 MiB) `vmlinux` on release w/o Rust is 22 MiB (compressed: 1.9 MiB) i.e. the bulk is now shared. + Multiple builtin modules are now supported since their symbols do not collide against each other (fixes #9). + Faster compilation (less crates to compile & less repetition). + We achieve this by compiling all the shared code to `.rlib`s (and the `.so` for the proc macro). For loadable modules, we need to rely on the upcoming v0 Rust mangling scheme, plus we need to export the Rust symbols needed by the `.ko`s. - Simpler, flat file structure: now a small driver may only need a single file like `drivers/char/rust_example.rs`, like in C. + All the `rust/*` and `driver/char/rust_example/*` files moved to fit in the new structure. Way less files around! - Only `rust-lang/{rust,rust-bindgen,compiler-builtins}` as dependencies. + Also helps with the faster compilation. - Offline builds, always; i.e. there is no "online compilation" anymore (fixes #17). - No more interleaved Cargo output (fixes #29). - One less nightly dependency (Cargo's `build-std`); since now we manage the cross-compilation ourselves (should fix #27). - Since now a kernel can be "Rust-enabled", a new `CONFIG_RUST` option is added to enable/disable it manually, regardless of whether one has `rustc` available or not (`CONFIG_HAS_RUST`). - Improved handling of `rustc` flags (`opt-level`, `debuginfo`, etc.), following what the user selected for C (no Cargo profiles). - Added Kconfig menu for tweaking `rustc` options, like overflow checks. - This rewrite of the Kbuild support is cleaner, i.e. less hacks in general handling paths (e.g. no more `shell readlink` for `O=`). - Duplicated the example driver 3 times so that we can test in the CI that 2 builtins and 2 loadables work, all at the same time. - Updated the quick start guide. - Updated CI `.config`s: + Add the new options and test with 2 builtins and 2 loadables. At the same time, remove the matrix test for builtin/loadable. + Debug: more things enabled (debuginfo, kgdb, unit testing, etc.) that mimic more what a developer would have. Running the CI will be slightly slower, but should be OK. + Release: disabled `EXPERT` and changed a few things to make it look more like a normal configuration. + Also update both configs to v5.9 while I was at it. (I could have split a few of these ones off into another PR, but anyway it is for the CI only and I had already done it). - Less `extern crate`s needed since we pass it via `rustc` (closer to idiomatic 2018 edition Rust code). Things to note: - There is one more nightly feature used (the new Rust mangling scheme), but we know that one will be stable (and the default one, later on). - The hack at `exports.c` to export symbols to loadable modules. - The hack at `allocator.rs` to get the `__rust_*()` functions. There are a few TODOs that we can improve later if we agree on this: - Kbuild: + Actually use the `*.d` files. + Complete `make clean`. + Support single-object compilation. + Pass `objtool` to make the ORC unwinder work. + Echo the building of the rust/* libraries and the bindgen call. - Figure out how to pick symbols to export automatically from Rust code instead of managing the list by hand. Perhaps we could use a no-op macro on the Rust code, which is then parse by a script to pick up the symbols: pub fn foo() {} export_symbol!(foo); Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 73e0562 commit ac19154

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+797
-438
lines changed

.github/workflows/ci.yaml

+19-22
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
strategy:
1212
matrix:
1313
mode: [debug, release]
14-
module: [builtin, loadable]
1514
outputdir: [src, build]
1615

1716
steps:
@@ -22,13 +21,11 @@ jobs:
2221
- run: rustup default nightly-2020-08-27
2322
- run: rustup component add rustfmt
2423
- run: rustup component add rust-src
24+
- run: git clone --depth 1 --branch 0.1.36 https://github.com/rust-lang/compiler-builtins.git $(rustc --print sysroot)/lib/rustlib/src/compiler-builtins
2525

2626
# Build
2727
- run: cp .github/workflows/kernel-${{ matrix.mode }}.config .config
2828

29-
- if: matrix.module == 'loadable'
30-
run: sed -i -E 's/^(CONFIG_RUST_EXAMPLE=)(y)$/\1m/g' .config
31-
3229
- if: matrix.outputdir == 'build'
3330
run: mkdir build && mv .config build/.config
3431

@@ -38,9 +35,6 @@ jobs:
3835
run: make O=build CC=clang-10 LLVM_CONFIG_PATH=llvm-config-10 -j3
3936

4037
# Run
41-
- if: matrix.module == 'builtin'
42-
run: sed -i '/rust_example/d' .github/workflows/qemu-initramfs.desc
43-
4438
- if: matrix.outputdir == 'build'
4539
run: sed -i 's:drivers/:build/drivers/:' .github/workflows/qemu-initramfs.desc
4640

@@ -50,28 +44,31 @@ jobs:
5044
run: build/usr/gen_init_cpio .github/workflows/qemu-initramfs.desc > qemu-initramfs.img
5145

5246
- if: matrix.outputdir == 'src'
53-
run: qemu-system-x86_64 -kernel arch/x86/boot/bzImage -initrd qemu-initramfs.img -cpu Cascadelake-Server -smp 2 -nographic -no-reboot -append "console=ttyS0 ${{ matrix.module == 'builtin' && 'rust_example.my_i32=123321' || '' }}" | tee qemu-stdout.log
47+
run: qemu-system-x86_64 -kernel arch/x86/boot/bzImage -initrd qemu-initramfs.img -cpu Cascadelake-Server -smp 2 -nographic -no-reboot -append "console=ttyS0 rust_example.my_i32=123321 rust_example_2.my_i32=234432" | tee qemu-stdout.log
5448
- if: matrix.outputdir == 'build'
55-
run: qemu-system-x86_64 -kernel build/arch/x86/boot/bzImage -initrd qemu-initramfs.img -cpu Cascadelake-Server -smp 2 -nographic -no-reboot -append "console=ttyS0 ${{ matrix.module == 'builtin' && 'rust_example.my_i32=123321' || '' }}" | tee qemu-stdout.log
49+
run: qemu-system-x86_64 -kernel build/arch/x86/boot/bzImage -initrd qemu-initramfs.img -cpu Cascadelake-Server -smp 2 -nographic -no-reboot -append "console=ttyS0 rust_example.my_i32=123321 rust_example_2.my_i32=234432" | tee qemu-stdout.log
5650

5751
# Check
58-
- run: grep -F 'Rust Example (init)' qemu-stdout.log
59-
- run: "grep 'my_i32: \\+123321' qemu-stdout.log"
60-
- if: matrix.module == 'loadable'
61-
run: grep -F 'Rust Example (exit)' qemu-stdout.log
52+
- run: grep -F '] Rust Example (init)' qemu-stdout.log
53+
- run: grep -F '] [2] Rust Example (init)' qemu-stdout.log
54+
- run: grep -F '] [3] Rust Example (init)' qemu-stdout.log
55+
- run: grep -F '] [4] Rust Example (init)' qemu-stdout.log
6256

63-
# Report
64-
- if: matrix.outputdir == 'src' && matrix.module == 'loadable'
65-
run: ls -l drivers/char/rust_example/rust_example.ko
66-
- if: matrix.outputdir == 'build' && matrix.module == 'loadable'
67-
run: ls -l build/drivers/char/rust_example/rust_example.ko
57+
- run: "grep -F '] my_i32: 123321' qemu-stdout.log"
58+
- run: "grep -F '] [2] my_i32: 234432' qemu-stdout.log"
59+
- run: "grep -F '] [3] my_i32: 345543' qemu-stdout.log"
60+
- run: "grep -F '] [4] my_i32: 456654' qemu-stdout.log"
6861

62+
- run: grep -F '] [3] Rust Example (exit)' qemu-stdout.log
63+
- run: grep -F '] [4] Rust Example (exit)' qemu-stdout.log
64+
65+
# Report
6966
- if: matrix.outputdir == 'src'
70-
run: ls -l vmlinux arch/x86/boot/bzImage
67+
run: ls -l drivers/char/rust_example.o drivers/char/rust_example_3.ko rust/*.o vmlinux arch/x86/boot/bzImage
7168
- if: matrix.outputdir == 'build'
72-
run: ls -l build/vmlinux build/arch/x86/boot/bzImage
69+
run: ls -l build/drivers/char/rust_example.o build/drivers/char/rust_example_3.ko build/rust/*.o build/vmlinux build/arch/x86/boot/bzImage
7370

7471
- if: matrix.outputdir == 'src'
75-
run: size vmlinux
72+
run: size drivers/char/rust_example.o drivers/char/rust_example_3.ko rust/*.o vmlinux
7673
- if: matrix.outputdir == 'build'
77-
run: size build/vmlinux
74+
run: size build/drivers/char/rust_example.o build/drivers/char/rust_example_3.ko build/rust/*.o build/vmlinux

.github/workflows/kernel-debug.config

+101-31
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/x86 5.9.0-rc2 Kernel Configuration
3+
# Linux/x86 5.9.0 Kernel Configuration
44
#
55
CONFIG_CC_VERSION_TEXT="clang version 10.0.1"
66
CONFIG_GCC_VERSION=0
77
CONFIG_LD_VERSION=230000000
88
CONFIG_CC_IS_CLANG=y
9+
CONFIG_LD_IS_LLD=y
910
CONFIG_CLANG_VERSION=100001
1011
CONFIG_HAS_RUST=y
1112
CONFIG_RUSTC_VERSION=14800
12-
CONFIG_CARGO_VERSION=14800
1313
CONFIG_CC_CAN_LINK=y
1414
CONFIG_CC_CAN_LINK_STATIC=y
1515
CONFIG_CC_HAS_ASM_GOTO=y
16+
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
17+
CONFIG_TOOLS_SUPPORT_RELR=y
18+
CONFIG_CC_HAS_ASM_INLINE=y
1619
CONFIG_CONSTRUCTORS=y
1720
CONFIG_IRQ_WORK=y
1821
CONFIG_BUILDTIME_TABLE_SORT=y
@@ -199,10 +202,11 @@ CONFIG_SLUB=y
199202
# CONFIG_SLOB is not set
200203
# CONFIG_SLAB_MERGE_DEFAULT is not set
201204
# CONFIG_SLAB_FREELIST_RANDOM is not set
202-
# CONFIG_SLAB_FREELIST_HARDENED is not set
205+
CONFIG_SLAB_FREELIST_HARDENED=y
203206
# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
204207
CONFIG_SLUB_CPU_PARTIAL=y
205208
# CONFIG_PROFILING is not set
209+
CONFIG_RUST=y
206210
CONFIG_TRACEPOINTS=y
207211
# end of General setup
208212

@@ -328,13 +332,8 @@ CONFIG_HZ=1000
328332
# CONFIG_KEXEC is not set
329333
# CONFIG_CRASH_DUMP is not set
330334
CONFIG_PHYSICAL_START=0x1000000
331-
CONFIG_RELOCATABLE=y
332-
CONFIG_RANDOMIZE_BASE=y
333-
CONFIG_X86_NEED_RELOCS=y
335+
# CONFIG_RELOCATABLE is not set
334336
CONFIG_PHYSICAL_ALIGN=0x200000
335-
CONFIG_DYNAMIC_MEMORY_LAYOUT=y
336-
CONFIG_RANDOMIZE_MEMORY=y
337-
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
338337
CONFIG_HOTPLUG_CPU=y
339338
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
340339
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
@@ -349,7 +348,6 @@ CONFIG_HAVE_LIVEPATCH=y
349348
CONFIG_ARCH_HAS_ADD_PAGES=y
350349
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
351350
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
352-
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
353351

354352
#
355353
# Power management and ACPI options
@@ -554,9 +552,7 @@ CONFIG_PHYS_ADDR_T_64BIT=y
554552
CONFIG_VIRT_TO_BUS=y
555553
# CONFIG_KSM is not set
556554
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
557-
CONFIG_TRANSPARENT_HUGEPAGE=y
558-
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
559-
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
555+
# CONFIG_TRANSPARENT_HUGEPAGE is not set
560556
CONFIG_ARCH_WANTS_THP_SWAP=y
561557
# CONFIG_CLEANCACHE is not set
562558
# CONFIG_CMA is not set
@@ -603,7 +599,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
603599
# CONFIG_DEBUG_DRIVER is not set
604600
# CONFIG_DEBUG_DEVRES is not set
605601
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
602+
# CONFIG_PM_QOS_KUNIT_TEST is not set
606603
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
604+
# CONFIG_KUNIT_DRIVER_PE_TEST is not set
607605
CONFIG_GENERIC_CPU_AUTOPROBE=y
608606
CONFIG_GENERIC_CPU_VULNERABILITIES=y
609607
# end of Generic Driver Options
@@ -736,9 +734,11 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=1
736734
#
737735
# Non-8250 serial port support
738736
#
737+
# CONFIG_SERIAL_KGDB_NMI is not set
739738
# CONFIG_SERIAL_UARTLITE is not set
740739
CONFIG_SERIAL_CORE=y
741740
CONFIG_SERIAL_CORE_CONSOLE=y
741+
CONFIG_CONSOLE_POLL=y
742742
# CONFIG_SERIAL_LANTIQ is not set
743743
# CONFIG_SERIAL_SCCNXP is not set
744744
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
@@ -763,6 +763,9 @@ CONFIG_SERIAL_CORE_CONSOLE=y
763763
# CONFIG_TCG_TPM is not set
764764
# CONFIG_TELCLOCK is not set
765765
CONFIG_RUST_EXAMPLE=y
766+
CONFIG_RUST_EXAMPLE_2=y
767+
CONFIG_RUST_EXAMPLE_3=m
768+
CONFIG_RUST_EXAMPLE_4=m
766769
# end of Character devices
767770

768771
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
@@ -1093,11 +1096,11 @@ CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,appar
10931096
#
10941097
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
10951098
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
1096-
CONFIG_INIT_STACK_NONE=y
1097-
# CONFIG_INIT_STACK_ALL_PATTERN is not set
1099+
# CONFIG_INIT_STACK_NONE is not set
1100+
CONFIG_INIT_STACK_ALL_PATTERN=y
10981101
# CONFIG_INIT_STACK_ALL_ZERO is not set
1099-
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
1100-
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
1102+
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
1103+
CONFIG_INIT_ON_FREE_DEFAULT_ON=y
11011104
# end of Memory initialization
11021105
# end of Kernel hardening options
11031106
# end of Security options
@@ -1137,7 +1140,6 @@ CONFIG_CRC32_SLICEBY8=y
11371140
# CONFIG_CRC8 is not set
11381141
# CONFIG_RANDOM32_SELFTEST is not set
11391142
# CONFIG_XZ_DEC is not set
1140-
CONFIG_XARRAY_MULTI=y
11411143
CONFIG_HAS_IOMEM=y
11421144
CONFIG_HAS_IOPORT_MAP=y
11431145
CONFIG_HAS_DMA=y
@@ -1146,6 +1148,7 @@ CONFIG_NEED_DMA_MAP_STATE=y
11461148
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
11471149
CONFIG_SWIOTLB=y
11481150
# CONFIG_DMA_API_DEBUG is not set
1151+
# CONFIG_CPUMASK_OFFSTACK is not set
11491152
CONFIG_GLOB=y
11501153
# CONFIG_GLOB_SELFTEST is not set
11511154
# CONFIG_IRQ_POLL is not set
@@ -1184,36 +1187,53 @@ CONFIG_DEBUG_BUGVERBOSE=y
11841187
#
11851188
# Compile-time checks and compiler options
11861189
#
1187-
# CONFIG_DEBUG_INFO is not set
1190+
CONFIG_DEBUG_INFO=y
1191+
# CONFIG_DEBUG_INFO_REDUCED is not set
1192+
# CONFIG_DEBUG_INFO_COMPRESSED is not set
1193+
# CONFIG_DEBUG_INFO_SPLIT is not set
1194+
CONFIG_DEBUG_INFO_DWARF4=y
1195+
# CONFIG_DEBUG_INFO_BTF is not set
1196+
# CONFIG_GDB_SCRIPTS is not set
11881197
CONFIG_ENABLE_MUST_CHECK=y
11891198
CONFIG_FRAME_WARN=2048
11901199
# CONFIG_STRIP_ASM_SYMS is not set
1191-
# CONFIG_READABLE_ASM is not set
1200+
CONFIG_READABLE_ASM=y
11921201
# CONFIG_HEADERS_INSTALL is not set
11931202
# CONFIG_DEBUG_SECTION_MISMATCH is not set
11941203
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
1195-
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B is not set
1204+
CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B=y
11961205
CONFIG_STACK_VALIDATION=y
1206+
CONFIG_VMLINUX_VALIDATION=y
11971207
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
11981208
# end of Compile-time checks and compiler options
11991209

12001210
#
12011211
# Generic Kernel Debugging Instruments
12021212
#
1203-
# CONFIG_MAGIC_SYSRQ is not set
1213+
CONFIG_MAGIC_SYSRQ=y
1214+
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
1215+
CONFIG_MAGIC_SYSRQ_SERIAL=y
1216+
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
12041217
CONFIG_DEBUG_FS=y
12051218
# CONFIG_DEBUG_FS_ALLOW_ALL is not set
12061219
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
12071220
CONFIG_DEBUG_FS_ALLOW_NONE=y
12081221
CONFIG_HAVE_ARCH_KGDB=y
1209-
# CONFIG_KGDB is not set
1222+
CONFIG_KGDB=y
1223+
CONFIG_KGDB_SERIAL_CONSOLE=y
1224+
# CONFIG_KGDB_TESTS is not set
1225+
# CONFIG_KGDB_LOW_LEVEL_TRAP is not set
1226+
# CONFIG_KGDB_KDB is not set
1227+
CONFIG_ARCH_HAS_EARLY_DEBUG=y
12101228
CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
12111229
CONFIG_UBSAN=y
12121230
CONFIG_UBSAN_TRAP=y
12131231
CONFIG_UBSAN_BOUNDS=y
12141232
CONFIG_UBSAN_MISC=y
12151233
CONFIG_UBSAN_SANITIZE_ALL=y
12161234
# CONFIG_TEST_UBSAN is not set
1235+
CONFIG_HAVE_ARCH_KCSAN=y
1236+
CONFIG_HAVE_KCSAN_COMPILER=y
12171237
# end of Generic Kernel Debugging Instruments
12181238

12191239
CONFIG_DEBUG_KERNEL=y
@@ -1252,18 +1272,18 @@ CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
12521272
# CONFIG_DEBUG_KMEMLEAK_TEST is not set
12531273
# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
12541274
CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
1255-
# CONFIG_DEBUG_STACK_USAGE is not set
1275+
CONFIG_DEBUG_STACK_USAGE=y
12561276
CONFIG_SCHED_STACK_END_CHECK=y
12571277
CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y
12581278
CONFIG_DEBUG_VM=y
12591279
CONFIG_DEBUG_VM_VMACACHE=y
12601280
CONFIG_DEBUG_VM_RB=y
12611281
CONFIG_DEBUG_VM_PGFLAGS=y
1262-
# CONFIG_DEBUG_VM_PGTABLE is not set
1282+
CONFIG_DEBUG_VM_PGTABLE=y
12631283
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
12641284
CONFIG_DEBUG_VIRTUAL=y
12651285
CONFIG_DEBUG_MEMORY_INIT=y
1266-
# CONFIG_DEBUG_PER_CPU_MAPS is not set
1286+
CONFIG_DEBUG_PER_CPU_MAPS=y
12671287
CONFIG_HAVE_ARCH_KASAN=y
12681288
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
12691289
CONFIG_CC_HAS_KASAN_GENERIC=y
@@ -1348,7 +1368,7 @@ CONFIG_DEBUG_NOTIFIERS=y
13481368
CONFIG_BUG_ON_DATA_CORRUPTION=y
13491369
# end of Debug kernel data structures
13501370

1351-
# CONFIG_DEBUG_CREDENTIALS is not set
1371+
CONFIG_DEBUG_CREDENTIALS=y
13521372

13531373
#
13541374
# RCU Debugging
@@ -1384,7 +1404,6 @@ CONFIG_TRACING=y
13841404
CONFIG_TRACING_SUPPORT=y
13851405
# CONFIG_FTRACE is not set
13861406
# CONFIG_SAMPLES is not set
1387-
CONFIG_HAVE_ARCH_KCSAN=y
13881407
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
13891408
# CONFIG_STRICT_DEVMEM is not set
13901409

@@ -1404,7 +1423,7 @@ CONFIG_HAVE_MMIOTRACE_SUPPORT=y
14041423
CONFIG_IO_DELAY_NONE=y
14051424
# CONFIG_DEBUG_BOOT_PARAMS is not set
14061425
# CONFIG_CPA_DEBUG is not set
1407-
# CONFIG_DEBUG_ENTRY is not set
1426+
CONFIG_DEBUG_ENTRY=y
14081427
# CONFIG_DEBUG_NMI_SELFTEST is not set
14091428
# CONFIG_X86_DEBUG_FPU is not set
14101429
CONFIG_UNWINDER_ORC=y
@@ -1414,13 +1433,64 @@ CONFIG_UNWINDER_ORC=y
14141433
#
14151434
# Kernel Testing and Coverage
14161435
#
1417-
# CONFIG_KUNIT is not set
1436+
CONFIG_KUNIT=y
1437+
# CONFIG_KUNIT_DEBUGFS is not set
1438+
# CONFIG_KUNIT_TEST is not set
1439+
# CONFIG_KUNIT_EXAMPLE_TEST is not set
1440+
# CONFIG_KUNIT_ALL_TESTS is not set
14181441
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
14191442
# CONFIG_FAULT_INJECTION is not set
14201443
CONFIG_ARCH_HAS_KCOV=y
14211444
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
14221445
# CONFIG_KCOV is not set
1423-
# CONFIG_RUNTIME_TESTING_MENU is not set
1446+
CONFIG_RUNTIME_TESTING_MENU=y
1447+
# CONFIG_LKDTM is not set
1448+
# CONFIG_TEST_LIST_SORT is not set
1449+
# CONFIG_TEST_MIN_HEAP is not set
1450+
# CONFIG_TEST_SORT is not set
1451+
# CONFIG_BACKTRACE_SELF_TEST is not set
1452+
# CONFIG_RBTREE_TEST is not set
1453+
# CONFIG_REED_SOLOMON_TEST is not set
1454+
# CONFIG_INTERVAL_TREE_TEST is not set
1455+
# CONFIG_PERCPU_TEST is not set
1456+
# CONFIG_ATOMIC64_SELFTEST is not set
1457+
# CONFIG_TEST_HEXDUMP is not set
1458+
# CONFIG_TEST_STRING_HELPERS is not set
1459+
# CONFIG_TEST_STRSCPY is not set
1460+
# CONFIG_TEST_KSTRTOX is not set
1461+
# CONFIG_TEST_PRINTF is not set
1462+
# CONFIG_TEST_BITMAP is not set
1463+
# CONFIG_TEST_BITFIELD is not set
1464+
# CONFIG_TEST_UUID is not set
1465+
# CONFIG_TEST_XARRAY is not set
1466+
# CONFIG_TEST_OVERFLOW is not set
1467+
# CONFIG_TEST_RHASHTABLE is not set
1468+
# CONFIG_TEST_HASH is not set
1469+
# CONFIG_TEST_IDA is not set
1470+
# CONFIG_TEST_LKM is not set
1471+
# CONFIG_TEST_BITOPS is not set
1472+
# CONFIG_TEST_VMALLOC is not set
1473+
# CONFIG_TEST_USER_COPY is not set
1474+
# CONFIG_FIND_BIT_BENCHMARK is not set
1475+
# CONFIG_SYSCTL_KUNIT_TEST is not set
1476+
# CONFIG_LIST_KUNIT_TEST is not set
1477+
# CONFIG_LINEAR_RANGES_TEST is not set
1478+
# CONFIG_BITS_TEST is not set
1479+
# CONFIG_TEST_UDELAY is not set
1480+
# CONFIG_TEST_STATIC_KEYS is not set
1481+
# CONFIG_TEST_DEBUG_VIRTUAL is not set
1482+
# CONFIG_TEST_MEMCAT_P is not set
1483+
# CONFIG_TEST_STACKINIT is not set
1484+
# CONFIG_TEST_MEMINIT is not set
1485+
# CONFIG_TEST_FPU is not set
14241486
# CONFIG_MEMTEST is not set
14251487
# end of Kernel Testing and Coverage
1488+
1489+
#
1490+
# Rust hacking
1491+
#
1492+
CONFIG_RUST_DEBUG_ASSERTIONS=y
1493+
CONFIG_RUST_OVERFLOW_CHECKS=y
1494+
CONFIG_RUST_CODEGEN_UNITS=1
1495+
# end of Rust hacking
14261496
# end of Kernel hacking

0 commit comments

Comments
 (0)