Skip to content

Commit

Permalink
Merge branch 'rust' into file_flags_type
Browse files Browse the repository at this point in the history
  • Loading branch information
wedsonaf authored Jul 12, 2022
2 parents 5a83d71 + 1781c4c commit e55cbe3
Show file tree
Hide file tree
Showing 22,722 changed files with 2,162,185 additions and 607,451 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
218 changes: 170 additions & 48 deletions .clang-format

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
ci:
runs-on: ubuntu-20.04
container: ghcr.io/rust-for-linux/ci
container: ghcr.io/rust-for-linux/ci:Rust-1.62.0
timeout-minutes: 20

strategy:
Expand Down Expand Up @@ -266,6 +266,9 @@ jobs:
! grep -v 'at mm/debug_vm_pgtable.c:' qemu-stdout.log | grep '] WARNING:'
# Check
- run: |
grep '] ok 1 - rust_kernel_doctests$' qemu-stdout.log
- run: |
grep '] rust_minimal: Rust minimal sample (init)$' qemu-stdout.log
grep '] rust_minimal: Am I built-in? false$' qemu-stdout.log
Expand Down Expand Up @@ -360,6 +363,11 @@ jobs:
grep '] rust_semaphore_c: Rust semaphore sample (in C, for comparison) (init)$' qemu-stdout.log
grep '] rust_semaphore_c: Rust semaphore sample (in C, for comparison) (exit)$' qemu-stdout.log
- run: |
grep '] rust_selftests: Rust self tests (init)$' qemu-stdout.log
grep '] rust_selftests: All tests passed. Congratulations!$' qemu-stdout.log
grep '] rust_selftests: Rust self tests (exit)$' qemu-stdout.log
# Report
- run: |
cat ${{ env.BUILD_DIR }}.config
Expand Down Expand Up @@ -405,5 +413,8 @@ jobs:
grep -F '.text' ${{ env.BUILD_DIR }}samples/rust/rust_minimal.s
grep -F '; ModuleID' ${{ env.BUILD_DIR }}samples/rust/rust_minimal.ll
# Rust host programs
- run: ${{ env.BUILD_DIR }}samples/rust/hostprogs/single | grep -F 'The number is 42.'

# View changes to ccache
- run: ccache -s
5 changes: 4 additions & 1 deletion .github/workflows/kernel-arm-debug.config
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
# CONFIG_STRICT_DEVMEM is not set

#
Expand All @@ -1801,7 +1803,7 @@ CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
Expand All @@ -1826,6 +1828,7 @@ CONFIG_RUST_OPT_LEVEL_2=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/kernel-arm-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
# CONFIG_STRICT_DEVMEM is not set

#
Expand All @@ -1724,7 +1726,7 @@ CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
Expand Down Expand Up @@ -1784,7 +1786,8 @@ CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

CONFIG_WERROR=y
CONFIG_WERROR=y
5 changes: 4 additions & 1 deletion .github/workflows/kernel-arm64-debug-thinlto.config
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m

#
# arm64 Debugging
Expand All @@ -1449,7 +1451,7 @@ CONFIG_PID_IN_CONTEXTIDR=y
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
CONFIG_FUNCTION_ERROR_INJECTION=y
# CONFIG_FAULT_INJECTION is not set
Expand All @@ -1475,6 +1477,7 @@ CONFIG_RUST_OPT_LEVEL_1=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/kernel-arm64-debug.config
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m

#
# arm64 Debugging
Expand All @@ -1444,7 +1446,7 @@ CONFIG_PID_IN_CONTEXTIDR=y
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
CONFIG_FUNCTION_ERROR_INJECTION=y
# CONFIG_FAULT_INJECTION is not set
Expand All @@ -1470,6 +1472,7 @@ CONFIG_RUST_OPT_LEVEL_1=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/kernel-arm64-release-thinlto.config
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m

#
# arm64 Debugging
Expand All @@ -1367,7 +1369,7 @@ CONFIG_SAMPLE_RUST_RANDOM=m
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
Expand All @@ -1392,7 +1394,8 @@ CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

CONFIG_WERROR=y
CONFIG_WERROR=y
7 changes: 5 additions & 2 deletions .github/workflows/kernel-arm64-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m

#
# arm64 Debugging
Expand All @@ -1362,7 +1364,7 @@ CONFIG_SAMPLE_RUST_RANDOM=m
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
Expand All @@ -1387,7 +1389,8 @@ CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

CONFIG_WERROR=y
CONFIG_WERROR=y
5 changes: 4 additions & 1 deletion .github/workflows/kernel-ppc64le-debug.config
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem

# CONFIG_PREEMPT_NONE is not set
Expand Down Expand Up @@ -1492,6 +1492,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

Expand Down Expand Up @@ -1591,6 +1593,7 @@ CONFIG_RUST_OPT_LEVEL_0=y
# CONFIG_RUST_OPT_LEVEL_Z is not set
CONFIG_RUST_BUILD_ASSERT_ALLOW=y
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/kernel-ppc64le-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem

# CONFIG_PREEMPT_NONE is not set
Expand Down Expand Up @@ -1454,6 +1454,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

Expand All @@ -1472,7 +1474,7 @@ CONFIG_PRINT_STACK_DEPTH=64
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
CONFIG_ARCH_HAS_KCOV=y
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# CONFIG_KCOV is not set
Expand All @@ -1495,7 +1497,8 @@ CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

CONFIG_WERROR=y
CONFIG_WERROR=y
5 changes: 4 additions & 1 deletion .github/workflows/kernel-riscv64-debug.config
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
# CONFIG_STRICT_DEVMEM is not set

#
Expand All @@ -1295,7 +1297,7 @@ CONFIG_SAMPLE_RUST_RANDOM=m
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
Expand All @@ -1319,6 +1321,7 @@ CONFIG_RUST_OPT_LEVEL_0=y
# CONFIG_RUST_OPT_LEVEL_Z is not set
CONFIG_RUST_BUILD_ASSERT_ALLOW=y
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/kernel-riscv64-release.config
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
# CONFIG_STRICT_DEVMEM is not set

#
Expand All @@ -1211,7 +1213,7 @@ CONFIG_SAMPLE_RUST_RANDOM=m
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
CONFIG_ARCH_HAS_KCOV=y
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# CONFIG_KCOV is not set
Expand All @@ -1234,7 +1236,8 @@ CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

CONFIG_WERROR=y
CONFIG_WERROR=y
3 changes: 3 additions & 0 deletions .github/workflows/kernel-x86_64-debug-thinlto.config
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

Expand Down Expand Up @@ -1542,6 +1544,7 @@ CONFIG_RUST_OPT_LEVEL_0=y
# CONFIG_RUST_OPT_LEVEL_Z is not set
CONFIG_RUST_BUILD_ASSERT_ALLOW=y
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/kernel-x86_64-debug.config
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

Expand Down Expand Up @@ -1545,6 +1547,7 @@ CONFIG_RUST_OPT_LEVEL_0=y
# CONFIG_RUST_OPT_LEVEL_Z is not set
CONFIG_RUST_BUILD_ASSERT_ALLOW=y
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/kernel-x86_64-release-thinlto.config
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,8 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
CONFIG_SAMPLE_RUST_SEMAPHORE=m
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
CONFIG_SAMPLE_RUST_RANDOM=m
CONFIG_SAMPLE_RUST_HOSTPROGS=y
CONFIG_SAMPLE_RUST_SELFTESTS=m
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

Expand All @@ -1419,7 +1421,7 @@ CONFIG_UNWINDER_ORC=y
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
CONFIG_KUNIT=y
CONFIG_ARCH_HAS_KCOV=y
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# CONFIG_KCOV is not set
Expand All @@ -1442,7 +1444,8 @@ CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
# CONFIG_RUST_BUILD_ASSERT_WARN is not set
CONFIG_RUST_BUILD_ASSERT_DENY=y
CONFIG_RUST_KERNEL_KUNIT_TEST=y
# end of Rust hacking
# end of Kernel hacking

CONFIG_WERROR=y
CONFIG_WERROR=y
Loading

0 comments on commit e55cbe3

Please sign in to comment.