diff --git a/.github/workflows/mainline-clang-11.yml b/.github/workflows/mainline-clang-11.yml index 47863af7..d51a229d 100644 --- a/.github/workflows/mainline-clang-11.yml +++ b/.github/workflows/mainline-clang-11.yml @@ -393,6 +393,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _4a3742e4906edde3d649253fb7933b23: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=11 defconfig + env: + ARCH: um + LLVM_VERSION: 11 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _73f8d728902a8cc9c807d77d1aaaedaf: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs diff --git a/.github/workflows/mainline-clang-12.yml b/.github/workflows/mainline-clang-12.yml index 3a85fec2..118b70c4 100644 --- a/.github/workflows/mainline-clang-12.yml +++ b/.github/workflows/mainline-clang-12.yml @@ -450,6 +450,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _9e93b73ca7d90baea53da3d1e9613b4b: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=12 defconfig + env: + ARCH: um + LLVM_VERSION: 12 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _d49633cca166398690b1f3ecad135a14: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs diff --git a/.github/workflows/mainline-clang-13.yml b/.github/workflows/mainline-clang-13.yml index 75a747d6..a2a1d14d 100644 --- a/.github/workflows/mainline-clang-13.yml +++ b/.github/workflows/mainline-clang-13.yml @@ -507,6 +507,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _171147249819cb6e8281ffa046070e68: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=13 defconfig + env: + ARCH: um + LLVM_VERSION: 13 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _5725232ce5f790d6db053c3d226eead6: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs diff --git a/.github/workflows/mainline-clang-14.yml b/.github/workflows/mainline-clang-14.yml index bf2d53d2..a41ed023 100644 --- a/.github/workflows/mainline-clang-14.yml +++ b/.github/workflows/mainline-clang-14.yml @@ -507,6 +507,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _159d60218d64add121c8e24ad1c4d12c: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=14 defconfig + env: + ARCH: um + LLVM_VERSION: 14 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _f83a8a60320f3abf313f8a5759c5391c: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs diff --git a/.github/workflows/mainline-clang-15.yml b/.github/workflows/mainline-clang-15.yml index 5e7607c5..afd7bb57 100644 --- a/.github/workflows/mainline-clang-15.yml +++ b/.github/workflows/mainline-clang-15.yml @@ -507,6 +507,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _2044a9c1a33925cd52ae6576ea495d7d: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=15 defconfig + env: + ARCH: um + LLVM_VERSION: 15 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _6a10973686962e1686b87d8f19b7ec54: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs diff --git a/.github/workflows/next-clang-11.yml b/.github/workflows/next-clang-11.yml index cbda65ff..c702ff0b 100644 --- a/.github/workflows/next-clang-11.yml +++ b/.github/workflows/next-clang-11.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml || true + run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -393,6 +393,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _4a3742e4906edde3d649253fb7933b23: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=11 defconfig + env: + ARCH: um + LLVM_VERSION: 11 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _73f8d728902a8cc9c807d77d1aaaedaf: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs @@ -516,7 +535,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml || true + run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -741,7 +760,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml || true + run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/next-clang-12.yml b/.github/workflows/next-clang-12.yml index ab5f11ed..d7c135f5 100644 --- a/.github/workflows/next-clang-12.yml +++ b/.github/workflows/next-clang-12.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml || true + run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -450,6 +450,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _9e93b73ca7d90baea53da3d1e9613b4b: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=12 defconfig + env: + ARCH: um + LLVM_VERSION: 12 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _d49633cca166398690b1f3ecad135a14: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs @@ -573,7 +592,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml || true + run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -779,7 +798,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml || true + run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/next-clang-13.yml b/.github/workflows/next-clang-13.yml index 6ebdab47..54cc2747 100644 --- a/.github/workflows/next-clang-13.yml +++ b/.github/workflows/next-clang-13.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml || true + run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -507,6 +507,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _171147249819cb6e8281ffa046070e68: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=13 defconfig + env: + ARCH: um + LLVM_VERSION: 13 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _5725232ce5f790d6db053c3d226eead6: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs @@ -649,7 +668,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml || true + run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -893,7 +912,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml || true + run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/next-clang-14.yml b/.github/workflows/next-clang-14.yml index 97c55cd3..e22c74fe 100644 --- a/.github/workflows/next-clang-14.yml +++ b/.github/workflows/next-clang-14.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml || true + run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -507,6 +507,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _159d60218d64add121c8e24ad1c4d12c: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=14 defconfig + env: + ARCH: um + LLVM_VERSION: 14 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _f83a8a60320f3abf313f8a5759c5391c: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs @@ -649,7 +668,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml || true + run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -893,7 +912,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml || true + run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/next-clang-15.yml b/.github/workflows/next-clang-15.yml index 212ef451..f7e35aab 100644 --- a/.github/workflows/next-clang-15.yml +++ b/.github/workflows/next-clang-15.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml || true + run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -507,6 +507,25 @@ jobs: name: output_artifact_defconfigs - name: Check Build and Boot Logs run: ./check_logs.py + _2044a9c1a33925cd52ae6576ea495d7d: + runs-on: ubuntu-latest + needs: kick_tuxsuite_defconfigs + name: ARCH=um LLVM=1 LLVM_IAS=1 LLVM_VERSION=15 defconfig + env: + ARCH: um + LLVM_VERSION: 15 + BOOT: 1 + CONFIG: defconfig + container: ghcr.io/clangbuiltlinux/qemu + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/download-artifact@v2 + with: + name: output_artifact_defconfigs + - name: Check Build and Boot Logs + run: ./check_logs.py _6a10973686962e1686b87d8f19b7ec54: runs-on: ubuntu-latest needs: kick_tuxsuite_defconfigs @@ -649,7 +668,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml || true + run: tuxsuite build-set --set-name distribution_configs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -893,7 +912,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml || true + run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/next-clang-android.yml b/.github/workflows/next-clang-android.yml index 8b50c35c..61487d41 100644 --- a/.github/workflows/next-clang-android.yml +++ b/.github/workflows/next-clang-android.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-android.tux.yml || true + run: tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-android.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: @@ -231,7 +231,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: tuxsuite - run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-android.tux.yml || true + run: tuxsuite build-set --set-name allconfigs --json-out builds.json --tux-config tuxsuite/next-clang-android.tux.yml --patch-series patches/next || true - name: save output uses: actions/upload-artifact@v2 with: diff --git a/boot-utils b/boot-utils index a707c91a..04921527 160000 --- a/boot-utils +++ b/boot-utils @@ -1 +1 @@ -Subproject commit a707c91a4857721ddc70ac2c495d515230f00f6c +Subproject commit 04921527b3cd47aef8dd99318d237e52dcf68042 diff --git a/check_logs.py b/check_logs.py index e6a05584..dc275016 100755 --- a/check_logs.py +++ b/check_logs.py @@ -206,19 +206,21 @@ def cwd(): def run_boot(build): cbl_arch = get_cbl_name() kernel_image = cwd() + "/" + get_image_name() - boot_qemu = [ - "./boot-utils/boot-qemu.sh", "-a", cbl_arch, "-k", kernel_image - ] + if cbl_arch == "um": + boot_cmd = ["./boot-utils/boot-uml.sh"] + else: + boot_cmd = ["./boot-utils/boot-qemu.sh", "-a", cbl_arch] + boot_cmd += ["-k", kernel_image] # If we are running a sanitizer build, we should increase the number of # cores and timeout because booting is much slower if "CONFIG_KASAN=y" in build["kconfig"] or \ "CONFIG_KCSAN=y" in build["kconfig"] or \ "CONFIG_UBSAN=y" in build["kconfig"]: - boot_qemu += ["-s", "4"] + boot_cmd += ["-s", "4"] if "CONFIG_KASAN=y" in build["kconfig"]: - boot_qemu += ["-t", "20m"] + boot_cmd += ["-t", "20m"] else: - boot_qemu += ["-t", "10m"] + boot_cmd += ["-t", "10m"] if "CONFIG_KASAN_KUNIT_TEST=y" in build["kconfig"] or \ "CONFIG_KCSAN_KUNIT_TEST=y" in build["kconfig"]: print_yellow( @@ -231,7 +233,7 @@ def run_boot(build): sys.stderr.flush() try: - subprocess.run(boot_qemu, check=True) + subprocess.run(boot_cmd, check=True) except subprocess.CalledProcessError as e: if e.returncode == 124: print_red("Image failed to boot") diff --git a/generator.yml b/generator.yml index b3e984a7..0a325a27 100644 --- a/generator.yml +++ b/generator.yml @@ -161,6 +161,7 @@ architectures: - &powerpc-arch powerpc - &riscv-arch riscv - &s390-arch s390 + - &um-arch um triples: - &arm-triple {CROSS_COMPILE: arm-linux-gnueabi-, ARCH: *arm-arch} - &arm64-triple {CROSS_COMPILE: aarch64-linux-gnu-, ARCH: *arm64-arch} @@ -173,6 +174,7 @@ triples: - &powerpc64le-triple {CROSS_COMPILE: powerpc64le-linux-gnu, ARCH: *powerpc-arch} - &riscv-triple {CROSS_COMPILE: riscv64-linux-gnu, ARCH: *riscv-arch} - &s390-triple {CROSS_COMPILE: s390x-linux-gnu, ARCH: *s390-arch} + - &um-triple {CROSS_COMPILE: "", ARCH: *um-arch} targets: - &default {targets: [default]} - &kernel {targets: [kernel]} @@ -237,6 +239,7 @@ configs: # CONFIG_BPF_PRELOAD disabled for all cross compiled Fedora configs: https://github.com/ClangBuiltLinux/linux/issues/1433 - &s390_fedora {config: [*s390-fedora-config-url, CONFIG_BPF_PRELOAD=n], << : *s390-triple, << : *kernel} - &s390_suse {config: *s390-suse-config-url, << : *s390-triple, << : *kernel} + - &um {config: defconfig, << : *um-triple, << : *kernel} - &x86_64 {config: defconfig, << : *kernel} - &x86_64_lto_full {config: [defconfig, CONFIG_LTO_CLANG_FULL=y], << : *kernel} - &x86_64_lto_thin {config: [defconfig, CONFIG_LTO_CLANG_THIN=y], << : *kernel} @@ -323,6 +326,7 @@ builds: - {<< : *s390_kasan, << : *mainline, << : *clang, boot: true, << : *llvm_tot} - {<< : *s390_fedora, << : *mainline, << : *clang, boot: true, << : *llvm_tot} - {<< : *s390_suse, << : *mainline, << : *clang, boot: true, << : *llvm_tot} + - {<< : *um, << : *mainline, << : *llvm_full, boot: true, << : *llvm_tot} - {<< : *x86_64, << : *mainline, << : *llvm_full, boot: true, << : *llvm_tot} - {<< : *x86_64_lto_full, << : *mainline, << : *llvm_full, boot: true, << : *llvm_tot} - {<< : *x86_64_lto_thin, << : *mainline, << : *llvm_full, boot: true, << : *llvm_tot} @@ -384,6 +388,7 @@ builds: - {<< : *s390_kasan, << : *next, << : *clang, boot: true, << : *llvm_tot} - {<< : *s390_fedora, << : *next, << : *clang, boot: true, << : *llvm_tot} - {<< : *s390_suse, << : *next, << : *clang, boot: true, << : *llvm_tot} + - {<< : *um, << : *next, << : *llvm_full, boot: true, << : *llvm_tot} - {<< : *x86_64, << : *next, << : *llvm_full, boot: true, << : *llvm_tot} - {<< : *x86_64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_tot} - {<< : *x86_64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_tot} @@ -686,6 +691,7 @@ builds: - {<< : *s390_kasan, << : *mainline, << : *clang, boot: true, << : *llvm_latest} - {<< : *s390_fedora, << : *mainline, << : *clang, boot: true, << : *llvm_latest} - {<< : *s390_suse, << : *mainline, << : *clang, boot: true, << : *llvm_latest} + - {<< : *um, << : *mainline, << : *llvm_full, boot: true, << : *llvm_latest} - {<< : *x86_64, << : *mainline, << : *llvm_full, boot: true, << : *llvm_latest} - {<< : *x86_64_lto_full, << : *mainline, << : *llvm_full, boot: true, << : *llvm_latest} - {<< : *x86_64_lto_thin, << : *mainline, << : *llvm_full, boot: true, << : *llvm_latest} @@ -747,6 +753,7 @@ builds: - {<< : *s390_kasan, << : *next, << : *clang, boot: true, << : *llvm_latest} - {<< : *s390_fedora, << : *next, << : *clang, boot: true, << : *llvm_latest} - {<< : *s390_suse, << : *next, << : *clang, boot: true, << : *llvm_latest} + - {<< : *um, << : *next, << : *llvm_full, boot: true, << : *llvm_latest} - {<< : *x86_64, << : *next, << : *llvm_full, boot: true, << : *llvm_latest} - {<< : *x86_64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_latest} - {<< : *x86_64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_latest} @@ -1048,6 +1055,7 @@ builds: - {<< : *s390_kasan, << : *mainline, << : *clang, boot: true, << : *llvm_13} - {<< : *s390_fedora, << : *mainline, << : *clang, boot: true, << : *llvm_13} - {<< : *s390_suse, << : *mainline, << : *clang, boot: true, << : *llvm_13} + - {<< : *um, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13} - {<< : *x86_64, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13} - {<< : *x86_64_lto_full, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13} - {<< : *x86_64_lto_thin, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13} @@ -1109,6 +1117,7 @@ builds: - {<< : *s390_kasan, << : *next, << : *clang, boot: true, << : *llvm_13} - {<< : *s390_fedora, << : *next, << : *clang, boot: true, << : *llvm_13} - {<< : *s390_suse, << : *next, << : *clang, boot: true, << : *llvm_13} + - {<< : *um, << : *next, << : *llvm_full, boot: true, << : *llvm_13} - {<< : *x86_64, << : *next, << : *llvm_full, boot: true, << : *llvm_13} - {<< : *x86_64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_13} - {<< : *x86_64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_13} @@ -1407,6 +1416,7 @@ builds: - {<< : *riscv_allmod, << : *mainline, << : *llvm, boot: false, << : *llvm_12} # s390: Build disabled (https://lore.kernel.org/r/YMtib5hKVyNknZt3@osiris/) # - {<< : *s390, << : *mainline, << : *clang, boot: true, << : *llvm_12} + - {<< : *um, << : *mainline, << : *llvm_full, boot: true, << : *llvm_12} - {<< : *x86_64, << : *mainline, << : *llvm_full, boot: true, << : *llvm_12} - {<< : *x86_64_lto_full, << : *mainline, << : *llvm_full, boot: true, << : *llvm_12} - {<< : *x86_64_lto_thin, << : *mainline, << : *llvm_full, boot: true, << : *llvm_12} @@ -1465,6 +1475,7 @@ builds: - {<< : *riscv_allmod, << : *next, << : *llvm, boot: false, << : *llvm_12} # s390: Build disabled (https://lore.kernel.org/r/YMtib5hKVyNknZt3@osiris/) # - {<< : *s390, << : *next, << : *clang, boot: true, << : *llvm_12} + - {<< : *um, << : *next, << : *llvm_full, boot: true, << : *llvm_12} - {<< : *x86_64, << : *next, << : *llvm_full, boot: true, << : *llvm_12} - {<< : *x86_64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_12} - {<< : *x86_64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_12} @@ -1716,6 +1727,7 @@ builds: - {<< : *riscv_allmod, << : *mainline, << : *llvm, boot: false, << : *llvm_11} # s390: Build disabled (https://lore.kernel.org/r/YMtib5hKVyNknZt3@osiris/) # - {<< : *s390, << : *mainline, << : *clang, boot: true, << : *llvm_11} + - {<< : *um, << : *mainline, << : *llvm_full, boot: true, << : *llvm_11} - {<< : *x86_64, << : *mainline, << : *llvm_full, boot: true, << : *llvm_11} - {<< : *x86_64_lto_full, << : *mainline, << : *llvm_full, boot: true, << : *llvm_11} - {<< : *x86_64_lto_thin, << : *mainline, << : *llvm_full, boot: true, << : *llvm_11} @@ -1772,6 +1784,7 @@ builds: - {<< : *riscv_allmod, << : *next, << : *llvm, boot: false, << : *llvm_11} # s390: Build disabled (https://lore.kernel.org/r/YMtib5hKVyNknZt3@osiris/) # - {<< : *s390, << : *next, << : *clang, boot: true, << : *llvm_11} + - {<< : *um, << : *next, << : *llvm_full, boot: true, << : *llvm_11} - {<< : *x86_64, << : *next, << : *llvm_full, boot: true, << : *llvm_11} - {<< : *x86_64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_11} - {<< : *x86_64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_11} diff --git a/patches/next/20220322_nathan_um_fix_filtering_mno_global_merge.patch b/patches/next/20220322_nathan_um_fix_filtering_mno_global_merge.patch new file mode 100644 index 00000000..9a8fedeb --- /dev/null +++ b/patches/next/20220322_nathan_um_fix_filtering_mno_global_merge.patch @@ -0,0 +1,66 @@ +From git@z Thu Jan 1 00:00:00 1970 +Subject: [PATCH] um: Fix filtering '-mno-global-merge' +From: Nathan Chancellor +Date: Tue, 22 Mar 2022 10:35:47 -0700 +Message-Id: <20220322173547.677760-1-nathan@kernel.org> +To: Richard Weinberger , Anton Ivanov , Johannes Berg +Cc: Nick Desaulniers , David Gow , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor +List-Id: +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 7bit + +When booting a clang compiled UML kernel, the kernel panics when trying +to run init: + + wait_stub_done : failed to wait for SIGTRAP, pid = 651294, n = 651294, errno = 0, status = 0xb7f + Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b + +After the commit in Fixes, many flags from KBUILD_CFLAGS do not appear +in USER_CFLAGS, likely due to USER_CFLAGS initially being a recursive +variable ("VAR =") then being switched to a simple ("VAR :=") variable. +For example, diffing arch/x86/um/.ptrace_user.o.cmd shows flags such as +'-Os' and '-fno-delete-null-pointer-checks' getting dropped, which both +impact code generation. + +Rework the filtering to use filter-out instead of patsubst, which allows +all the patterns that USER_CFLAGS cares about to be excluded in one +command and ensures all flags from KBUILD_CFLAGS are transferred over to +USER_CFLAGS properly, which resolves the boot issue noted above. + +Fixes: 6580c5c18fb3 ("um: clang: Strip out -mno-global-merge from USER_CFLAGS") +Signed-off-by: Nathan Chancellor +Reviewed-by: David Gow +Link: https://lore.kernel.org/r/20220322173547.677760-1-nathan@kernel.org +--- + arch/um/Makefile | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/arch/um/Makefile b/arch/um/Makefile +index 320b09cd513c..d202f501e9e1 100644 +--- a/arch/um/Makefile ++++ b/arch/um/Makefile +@@ -70,15 +70,11 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \ + + KBUILD_AFLAGS += $(ARCH_INCLUDE) + +-USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ ++USER_CFLAGS = $(filter-out $(KERNEL_DEFINES) -I% -mno-global-merge,$(KBUILD_CFLAGS)) \ + $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \ + -D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \ + -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ + +-ifdef CONFIG_CC_IS_CLANG +-USER_CFLAGS := $(patsubst -mno-global-merge,,$(USER_CFLAGS)) +-endif +- + #This will adjust *FLAGS accordingly to the platform. + include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) + + +base-commit: 82017457957a550d7d00dde419435dd74a890887 + +-- +2.35.1 + + diff --git a/patches/next/series b/patches/next/series new file mode 100644 index 00000000..dc6823cd --- /dev/null +++ b/patches/next/series @@ -0,0 +1 @@ +20220322_nathan_um_fix_filtering_mno_global_merge.patch diff --git a/tuxsuite/mainline-clang-11.tux.yml b/tuxsuite/mainline-clang-11.tux.yml index 72f31b4e..975f85f0 100644 --- a/tuxsuite/mainline-clang-11.tux.yml +++ b/tuxsuite/mainline-clang-11.tux.yml @@ -230,6 +230,16 @@ sets: make_variables: LLVM: 1 LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git_ref: master + target_arch: um + toolchain: clang-11 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/mainline-clang-12.tux.yml b/tuxsuite/mainline-clang-12.tux.yml index 0ebf5f70..8e994da0 100644 --- a/tuxsuite/mainline-clang-12.tux.yml +++ b/tuxsuite/mainline-clang-12.tux.yml @@ -267,6 +267,16 @@ sets: make_variables: LLVM: 1 LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git_ref: master + target_arch: um + toolchain: clang-12 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/mainline-clang-13.tux.yml b/tuxsuite/mainline-clang-13.tux.yml index 68a67307..cea82af2 100644 --- a/tuxsuite/mainline-clang-13.tux.yml +++ b/tuxsuite/mainline-clang-13.tux.yml @@ -301,6 +301,16 @@ sets: - kernel make_variables: LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git_ref: master + target_arch: um + toolchain: clang-13 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/mainline-clang-14.tux.yml b/tuxsuite/mainline-clang-14.tux.yml index 63f32aa7..d8882953 100644 --- a/tuxsuite/mainline-clang-14.tux.yml +++ b/tuxsuite/mainline-clang-14.tux.yml @@ -301,6 +301,16 @@ sets: - kernel make_variables: LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git_ref: master + target_arch: um + toolchain: clang-14 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/mainline-clang-15.tux.yml b/tuxsuite/mainline-clang-15.tux.yml index 6acafd21..8e44cbae 100644 --- a/tuxsuite/mainline-clang-15.tux.yml +++ b/tuxsuite/mainline-clang-15.tux.yml @@ -301,6 +301,16 @@ sets: - kernel make_variables: LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git_ref: master + target_arch: um + toolchain: clang-nightly + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/next-clang-11.tux.yml b/tuxsuite/next-clang-11.tux.yml index 6e88ccc6..f9db7baf 100644 --- a/tuxsuite/next-clang-11.tux.yml +++ b/tuxsuite/next-clang-11.tux.yml @@ -2,7 +2,7 @@ # This file has been autogenerated by invoking: # $ ./generate_tuxsuite.py next # Invoke tuxsuite via: -# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml +# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-11.tux.yml --patch-series patches/next sets: - name: defconfigs builds: @@ -230,6 +230,16 @@ sets: make_variables: LLVM: 1 LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + git_ref: master + target_arch: um + toolchain: clang-11 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/next-clang-12.tux.yml b/tuxsuite/next-clang-12.tux.yml index 29c678b4..12ffe7f6 100644 --- a/tuxsuite/next-clang-12.tux.yml +++ b/tuxsuite/next-clang-12.tux.yml @@ -2,7 +2,7 @@ # This file has been autogenerated by invoking: # $ ./generate_tuxsuite.py next # Invoke tuxsuite via: -# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml +# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-12.tux.yml --patch-series patches/next sets: - name: defconfigs builds: @@ -267,6 +267,16 @@ sets: make_variables: LLVM: 1 LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + git_ref: master + target_arch: um + toolchain: clang-12 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/next-clang-13.tux.yml b/tuxsuite/next-clang-13.tux.yml index 500e18bf..5ced3b05 100644 --- a/tuxsuite/next-clang-13.tux.yml +++ b/tuxsuite/next-clang-13.tux.yml @@ -2,7 +2,7 @@ # This file has been autogenerated by invoking: # $ ./generate_tuxsuite.py next # Invoke tuxsuite via: -# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml +# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-13.tux.yml --patch-series patches/next sets: - name: defconfigs builds: @@ -301,6 +301,16 @@ sets: - kernel make_variables: LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + git_ref: master + target_arch: um + toolchain: clang-13 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/next-clang-14.tux.yml b/tuxsuite/next-clang-14.tux.yml index 3d7a5f85..a68aae0c 100644 --- a/tuxsuite/next-clang-14.tux.yml +++ b/tuxsuite/next-clang-14.tux.yml @@ -2,7 +2,7 @@ # This file has been autogenerated by invoking: # $ ./generate_tuxsuite.py next # Invoke tuxsuite via: -# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml +# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-14.tux.yml --patch-series patches/next sets: - name: defconfigs builds: @@ -301,6 +301,16 @@ sets: - kernel make_variables: LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + git_ref: master + target_arch: um + toolchain: clang-14 + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/next-clang-15.tux.yml b/tuxsuite/next-clang-15.tux.yml index d2c518a6..06ac219c 100644 --- a/tuxsuite/next-clang-15.tux.yml +++ b/tuxsuite/next-clang-15.tux.yml @@ -2,7 +2,7 @@ # This file has been autogenerated by invoking: # $ ./generate_tuxsuite.py next # Invoke tuxsuite via: -# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml +# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-15.tux.yml --patch-series patches/next sets: - name: defconfigs builds: @@ -301,6 +301,16 @@ sets: - kernel make_variables: LLVM_IAS: 0 + - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + git_ref: master + target_arch: um + toolchain: clang-nightly + kconfig: defconfig + targets: + - kernel + make_variables: + LLVM: 1 + LLVM_IAS: 1 - git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git_ref: master target_arch: x86_64 diff --git a/tuxsuite/next-clang-android.tux.yml b/tuxsuite/next-clang-android.tux.yml index b0954486..d0ae62fd 100644 --- a/tuxsuite/next-clang-android.tux.yml +++ b/tuxsuite/next-clang-android.tux.yml @@ -2,7 +2,7 @@ # This file has been autogenerated by invoking: # $ ./generate_tuxsuite.py next # Invoke tuxsuite via: -# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-android.tux.yml +# $ tuxsuite build-set --set-name defconfigs --json-out builds.json --tux-config tuxsuite/next-clang-android.tux.yml --patch-series patches/next sets: - name: defconfigs builds: diff --git a/utils.py b/utils.py index ebb16ece..4f7cef2f 100644 --- a/utils.py +++ b/utils.py @@ -33,6 +33,7 @@ def get_image_name(): "mips": "vmlinux", "riscv": "Image", "s390": "bzImage", + "um": "linux", "x86_64": "bzImage", }[arch]