Skip to content

rust seems to break things #28

@gregkh

Description

@gregkh

When doing a "normal" allmodconfig build for 6.16.y, the tool crashes at the end with:

python3 sbom/sbom.py --src-tree ~/linux/stable/linux-6.16.y --output-tree ~/linux/stable/linux-6.16.y --root-output-in-tree vmlinux --spdx sbom.spdx.json --used-files sbom.used_files.txt
[INFO] Building cmd graph for vmlinux
[INFO] Build Node: vmlinux
[INFO] Build Node:   vmlinux.unstripped
[INFO] Build Node:     vmlinux.a
[INFO] Build Node:       built-in.a
[WARNING] Skipped parsing command because no matching parser was found for: sh 'scripts/xen-hypercalls.sh' arch/x86/include/generated/asm/xen-hypercalls.h include/xen/interface/xen-mca.h include/xen/interface/xen.h include/xen/interface/xenpmu.h
[WARNING] Skipped parsing command because no matching parser was found for: cat fs/unicode/utf8data.c_shipped > fs/unicode/utf8data.c
[WARNING] Skipped parsing command because no matching parser was found for: scripts/ipe/polgen/polgen security/ipe/boot_policy.c
[WARNING] Skipped parsing command because no matching parser was found for: OBJTREE=/mnt/fast_t2/linux/stable/linux-6.16.y rustc -Zbinary_dep_depinfo=y -Astable_features -Dnon_ascii_idents -Dunsafe_op_in_unsafe_fn -Wmissing_docs -Wrust_2018_idioms -Wclippy::all -Wclippy::ignored_unit_patterns -Wclippy::mut_mut -Wclippy::needless_bitwise_bool -Aclippy::needless_lifetimes -Wclippy::no_mangle_with_rust_abi -Wclippy::undocumented_unsafe_blocks -Wclippy::unnecessary_safety_comment -Wclippy::unnecessary_safety_doc -Wrustdoc::missing_crate_level_docs -Wrustdoc::unescaped_backticks -Cpanic=abort -Cembed-bitcode=n -Clto=n -Cforce-unwind-tables=n -Ccodegen-units=1 -Csymbol-mangling-version=v0 -Crelocation-model=static -Zfunction-sections=n -Wclippy::float_arithmetic --target=./scripts/target.json -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 -Zcf-protection=branch -Zno-jump-tables -Ctarget-cpu=native -Cno-redzone=y -Ccode-model=kernel -Zfunction-return=thunk-extern -Zpatchable-function-entry=64,64 -Copt-level=2 -Cdebug-assertions=y -Coverflow-checks=y -Dwarnings -Zsanitizer=kernel-address -Zsanitizer-recover=kernel-address -Cllvm-args=-asan-mapping-offset=0xdffffc0000000000 -Cllvm-args=-asan-instrumentation-with-call-threshold=0 -Cllvm-args=-asan-stack=1 -Cllvm-args=-asan-globals=1 -Cllvm-args=-asan-kernel-mem-intrinsic-prefix=1 @./include/generated/rustc_cfg --edition=2024 --cfg no_fp_fmt_parse --emit=dep-info=rust/.core.o.d --emit=obj=rust/core.o --emit=metadata=rust/libcore.rmeta --crate-type rlib -L./rust --crate-name core /usr/lib/rustlib/src/rust/library/core/src/lib.rs --sysroot=/dev/null
[WARNING] Skipped parsing command because no matching parser was found for: OBJTREE=/mnt/fast_t2/linux/stable/linux-6.16.y rustc --edition=2021 -Zbinary_dep_depinfo=y -Astable_features -Dnon_ascii_idents -Dunsafe_op_in_unsafe_fn -Wmissing_docs -Wrust_2018_idioms -Wunreachable_pub -Wclippy::all -Wclippy::ignored_unit_patterns -Wclippy::mut_mut -Wclippy::needless_bitwise_bool -Aclippy::needless_lifetimes -Wclippy::no_mangle_with_rust_abi -Wclippy::undocumented_unsafe_blocks -Wclippy::unnecessary_safety_comment -Wclippy::unnecessary_safety_doc -Wrustdoc::missing_crate_level_docs -Wrustdoc::unescaped_backticks -Cpanic=abort -Cembed-bitcode=n -Clto=n -Cforce-unwind-tables=n -Ccodegen-units=1 -Csymbol-mangling-version=v0 -Crelocation-model=static -Zfunction-sections=n -Wclippy::float_arithmetic --target=./scripts/target.json -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 -Zcf-protection=branch -Zno-jump-tables -Ctarget-cpu=native -Cno-redzone=y -Ccode-model=kernel -Zfunction-return=thunk-extern -Zpatchable-function-entry=64,64 -Copt-level=2 -Cdebug-assertions=y -Coverflow-checks=y -Dwarnings -Zsanitizer=kernel-address -Zsanitizer-recover=kernel-address -Cllvm-args=-asan-mapping-offset=0xdffffc0000000000 -Cllvm-args=-asan-instrumentation-with-call-threshold=0 -Cllvm-args=-asan-stack=1 -Cllvm-args=-asan-globals=1 -Cllvm-args=-asan-kernel-mem-intrinsic-prefix=1 -Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=3 -Cllvm-args=-sanitizer-coverage-trace-pc -Cllvm-args=-sanitizer-coverage-trace-compares @./include/generated/rustc_cfg  --emit=dep-info=rust/.compiler_builtins.o.d --emit=obj=rust/compiler_builtins.o --emit=metadata=rust/libcompiler_builtins.rmeta --crate-type rlib -L./rust --crate-name compiler_builtins rust/compiler_builtins.rs --sysroot=/dev/null
Traceback (most recent call last):
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/sbom.py", line 165, in <module>
    main()
    ~~~~^^
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/sbom.py", line 137, in main
    cmd_graph = build_cmd_graph(root_output_in_tree, output_tree, src_tree)
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/cmd_graph.py", line 97, in build_cmd_graph
    child_node = build_cmd_graph(child_path, output_tree, src_tree, cache, depth + 1, log_depth)
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/cmd_graph.py", line 97, in build_cmd_graph
    child_node = build_cmd_graph(child_path, output_tree, src_tree, cache, depth + 1, log_depth)
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/cmd_graph.py", line 97, in build_cmd_graph
    child_node = build_cmd_graph(child_path, output_tree, src_tree, cache, depth + 1, log_depth)
  [Previous line repeated 2 more times]
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/cmd_graph.py", line 77, in build_cmd_graph
    input_files = parse_commands(cmd_file.savedcmd)
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/savedcmd_parser.py", line 309, in parse_commands
    inputs = matched_parser(single_command)
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/savedcmd_parser.py", line 92, in _parse_objcopy_command
    command_parts = _tokenize_single_command(command, flag_options=["-S"])
  File "/mnt/fast_t2/linux/trees/KernelSbom/sbom/lib/sbom/cmd/savedcmd_parser.py", line 76, in _tokenize_single_command
    raise NotImplementedError(f"Unrecognized token: {token} in command {command}")
NotImplementedError: Unrecognized token: -w in command objcopy -w -W '__*' rust/compiler_builtins.o

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions