Skip to content

Commit 2846559

Browse files
committed
Merge branch 'latest' into net
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
2 parents ffec849 + 4ef69f0 commit 2846559

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,8 @@ source (or use symbolic links). `.clangd` needs to be placed at the root of the
298298
kernel source directory.
299299

300300
Notes:
301-
- The VSCode add-on needs some modifications, see
302-
[PR #5](https://github.com/FlorentRevest/linux-kernel-vscode/pull/5) and
303-
[PR #6](https://github.com/FlorentRevest/linux-kernel-vscode/pull/6). If these
304-
PRs are not merged, you can use
305-
[this fork](https://github.com/matttbe/linux-kernel-vscode/) (`virtme-support`
306-
branch) for the moment.
307-
- CLang will be used by VSCode instead of GCC. It is then required to launch all
308-
docker commands with `-e INPUT_CLANG=1`, see above.
301+
- CLang will be used by VSCode instead of GCC. If you still want to use some
302+
docker commands for manual actions, add `-e INPUT_CLANG=1`, see above.
309303
- CLangD will be used on the host machine, not in the Docker.
310304

311305
## CLang Analyzer

entrypoint.sh

+21-2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ VIRTME_RUN_OPTS=(
119119
--mods=auto
120120
--rw # Don't use "rwdir", it will use 9p ; in a container, we can use rw
121121
--pwd
122+
--server --port "${INPUT_VSOCK_CID}" # To connect to the VM using VSock
122123
--show-command
123124
--verbose --show-boot-console
124125
--kopt mitigations=off
@@ -401,8 +402,6 @@ setup_env() { local mode
401402
--memory "${INPUT_RAM}"
402403
)
403404

404-
# To connect to the VM using VSock
405-
VIRTME_RUN_OPTS+=("--server" "--port" "${INPUT_VSOCK_CID}")
406405

407406
OUTPUT_VIRTME="${RESULTS_DIR}/output.log"
408407
TESTS_SUMMARY="${RESULTS_DIR}/summary.txt"
@@ -622,8 +621,28 @@ gen_kconfig() { local mode kconfig=() vck rc=0
622621
if [ -s "${1:-}" ]; then
623622
local i
624623
for i in "${@}"; do
624+
# These options are already set by virtme, to avoid
625+
# duplicated output in the terminal, e.g. syzbot options
626+
sed -i 's/console=\S\+ //g;s/earlyprintk=\S\+ //g' "${i}"
625627
vck+=(--custom "${i}")
626628
done
629+
630+
# Disable components present in syzbot and not needed here
631+
kconfig+=(
632+
-d WLAN -d WIRELESS -d HAMRADIO -d CAN -d BT -d CAIF -d NFC
633+
-d ATA -d MEDIA_SUPPORT -d INFINIBAND -d STAGING
634+
-d X86_PLATFORM_DEVICES -d BATMAN_ADV -d OPENVSWITCH -d MPLS
635+
-d QRTR -d IP_DCCP -d RDS -d DLM -d IP_SCTP
636+
-d BCACHEFS_FS -d F2FS_FS -d BTRFS_FS -d OCFS2_FS -d XFS_FS
637+
-d JFS_FS -d ISO9660_FS -d MISC_FILESYSTEMS -d NFS_FS -d NFSD
638+
-d CEPH_FS -d CIFS -d SMB_SERVER -d AFS_FS -d TTY_PRINTK
639+
)
640+
641+
# Disable all net vendors, except Intel, for their e1000 driver
642+
# shellcheck disable=SC2207 # we do want to split
643+
kconfig+=($(grep "^config NET_VENDOR_" drivers/net/ethernet/*/Kconfig |
644+
awk '{ print "-d " $2 }'))
645+
kconfig+=(-e NET_VENDOR_INTEL)
627646
else
628647
kconfig+=("${@}")
629648
fi

run.sh

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ test -t 1 && VIRTME_INTERACTIVE="-t"
88

99
# host is different if worktree are used
1010
VIRTME_GIT_DIR="$(realpath "$(git rev-parse --git-common-dir)")"
11+
VIRTME_REAL_DIR="$(realpath .virtme)"
1112

1213
HOME_DIR="$(realpath "$(dirname "${0}")/.home")"
1314

@@ -19,6 +20,7 @@ done
1920
docker run \
2021
-v "${PWD}:${PWD}:rw" \
2122
-v "${VIRTME_GIT_DIR}:${VIRTME_GIT_DIR}:ro" \
23+
-v "${VIRTME_REAL_DIR}:${VIRTME_REAL_DIR}:rw" \
2224
${VIRTME_PACKETDRILL_PATH:+-v "${VIRTME_PACKETDRILL_PATH}:/opt/packetdrill:rw"} \
2325
-v "${HOME_DIR}:/root" \
2426
${VIRTME_SYZKALLER_PATH:+ -v "${VIRTME_SYZKALLER_PATH}:/opt/syzkaller:rw"} \

0 commit comments

Comments
 (0)