ClangBuiltLinux / linux

Linux kernel source tree
Other
241 stars 14 forks source link

ld.lld: error: drivers/gpu/drm/amd/amdgpu/amdgpu.o:(.debug_info+0x7d117f5): unknown relocation (33554442) against symbol #2034

Closed dileks closed 2 months ago

dileks commented 3 months ago

With Clang-ThinLTO and CONFIG_DEBUG_INFO_BTF=y and CONFIG_DEBUG_INFO_BTF_MODULES=y and CONFIG_DEBUG_INFO_DWARF5=y amdgpu kernel-module is BROKEN with Linux v6.9.7:

$ grep amdgpu build-log_6.9.7-1-amd64-clang18-kcfi.txt 
2587:make -f ./scripts/Makefile.build obj=drivers/gpu/drm/amd/amdgpu \
7635:# LD [M]  drivers/gpu/drm/amd/amdgpu/amdgpu.ko
7636:  ld.lld -r -m elf_x86_64 --thinlto-cache-dir=.thinlto-cache -mllvm -import-instr-limit=5 -z noexecstack --build-id=sha1  -T scripts/module.lds -o drivers/gpu/drm/amd/amdgpu/amdgpu.ko drivers/gpu/drm/amd/amdgpu/amdgpu.o drivers/gpu/drm/amd/amdgpu/amdgpu.mod.o
7657:ld.lld: error: drivers/gpu/drm/amd/amdgpu/amdgpu.o:(.debug_info+0x7d117f5): unknown relocation (33554442) against symbol 
7658:make[5]: *** [scripts/Makefile.modfinal:56: drivers/gpu/drm/amd/amdgpu/amdgpu.ko] Error 1

SLIM LLLVM toolchain version 18.1.8 was used from kernel.org.

Reported upstream (it does not look like a BTF/pahole issue); Link: https://lore.kernel.org/all/CA+icZUU71k9kh3GGc8w=F4rdJeBc3LOPH-gNXrjTTUicnufe5g@mail.gmail.com/

BROKEN linux-config is attached. config-6.9.7-1-amd64-clang18-kcfi.txt

dileks commented 3 months ago

With disabling both modules:

$ scripts/config -d DRM_AMDGPU -d DRM_NOUVEAU

I was able to build and boot into my Debian/unstable AMD64 system:

root# cat /proc/version Linux version 6.9.7-2-amd64-clang18-kcfi (sedat.dilek@gmail.com@iniza) (ClangBuiltLinux clang version 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095a b096dd780e84d7ab81f3d7ff), ClangBuiltLinux LLD 18.1.8)

2~trixie+dileks1 SMP PREEMPT_DYNAMIC 2024-06-30

dileks commented 3 months ago

I tried with and without revert of:

$ git revert f1feed67c79e ( Revert "kbuild: Remove support for Clang's ThinLTO caching" )

dileks commented 3 months ago

@MaskRay

Can you look at this, please?

dileks commented 3 months ago

@nathanchance

I am NOT able to assign labels.

nathanchance commented 3 months ago

@nathanchance

I am NOT able to assign labels.

I think you should be able to now? We did a massive role update a few months ago, so I have given you the triage role for this repo now.

As for both this issue and #2035, I cannot reproduce this on my system or a Debian container with pahole v1.24 (from Debian) or pahole from 693522e ("core: Ignore DW_TAG_inheritance with byte_size zero when finding holes").

$ git show -s --format='%h ("%s")'
12c740d50d4e ("Linux 6.9.7")

$ clang --version | head -1
ClangBuiltLinux clang version 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)

$ curl -LSso .config https://github.com/user-attachments/files/16046445/config-6.9.7-1-amd64-clang18-kcfi.txt

$ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 olddefconfig bindeb-pkg
dpkg-buildpackage: info: source package linux-upstream
dpkg-buildpackage: info: source version 6.9.7-1
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by nathan <nathan@distrobox-Dh9fBCEV4E.m3-large-x86>
dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match CC system type x86_64-unknown-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 make -f debian/rules binary
dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_6.9.7-1_amd64.deb'.
dpkg-deb: building package 'linux-headers-6.9.7' in '../linux-headers-6.9.7_6.9.7-1_amd64.deb'.
dpkg-deb: building package 'linux-image-6.9.7' in '../linux-image-6.9.7_6.9.7-1_amd64.deb'.
dpkg-deb: building package 'linux-image-6.9.7-dbg' in '../linux-image-6.9.7-dbg_6.9.7-1_amd64.deb'.
 dpkg-genbuildinfo --build=binary -O../linux-upstream_6.9.7-1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../linux-upstream_6.9.7-1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)

Is this fully reproducible for you? Can you try to tar up those binary files for further inspection to potentially see what is going on here?

dileks commented 3 months ago

Thanks for taking care and providing step-by-step instructions (sorry German output):

dileks@iniza:~/src/linux/git$ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 PAHOLE=/opt/pahole/bin/pahole olddefconfig bindeb-pkg
dpkg-buildpackage: Information: Quellpaket linux-upstream
dpkg-buildpackage: Information: Quellversion 6.9.7-1
dpkg-buildpackage: Information: Quelldistribution trixie
dpkg-buildpackage: Information: Quelle geändert durch dileks <dileks@iniza>
dpkg-architecture: Warnung: angegebener GNU-Systemtyp x86_64-linux-gnu passt nicht zu CC-Systemtyp x86_64-unknown-linux-gnu, versuchen Sie, eine korrekte CC-Umgebungsvariable zu setzen
dpkg-buildpackage: Information: Host-Architektur amd64
 dpkg-source --before-build .
 make -f debian/rules binary
dpkg-deb: Paket »linux-libc-dev« wird in »../linux-libc-dev_6.9.7-1_amd64.deb« gebaut.
dpkg-deb: Paket »linux-headers-6.9.7« wird in »../linux-headers-6.9.7_6.9.7-1_amd64.deb« gebaut.
dpkg-deb: Paket »linux-image-6.9.7« wird in »../linux-image-6.9.7_6.9.7-1_amd64.deb« gebaut.
dpkg-deb: Paket »linux-image-6.9.7-dbg« wird in »../linux-image-6.9.7-dbg_6.9.7-1_amd64.deb« gebaut.
 dpkg-genbuildinfo --build=binary -O../linux-upstream_6.9.7-1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../linux-upstream_6.9.7-1_amd64.changes
dpkg-genchanges: Information: Binärpaket(e) hochzuladen (kein Quellcode enthalten)
 dpkg-source --after-build .
dpkg-buildpackage: Information: Binärpaket(e) hochzuladen (keine Quelle enthalten)

INFO: Used vanilla Linux v6.9.7 (no modifications) and pahole v1.27-7-g693522ee3a94

UPDATE: Booting on bare metal OK

# cat /proc/version 
Linux version 6.9.7 (dileks@iniza) (ClangBuiltLinux clang version 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff), ClangBuiltLinux LLD 18.1.8) #1 SMP PREEMPT_DYNAMIC Tue Jul  2 02:30:57 CEST 2024
dileks commented 3 months ago

@nathanchance

Can you please test with my make line (resulting in BROKEN build)?

$ cat start-build.txt 
dileks     74717   74680  0 11:08 pts/1    00:00:00 /usr/bin/perf stat make V=1 -j4 LLVM=1 LLVM_IAS=1 PAHOLE=/opt/pahole/bin/pahole LOCALVERSION=-1-amd64-clang18-kcfi KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@gmail.com KBUILD_BUILD_TIMESTAMP=2024-06-30 bindeb-pkg KDEB_PKGVERSION=6.9.7-1~trixie+dileks1
nathanchance commented 3 months ago

@nathanchance

Can you please test with my make line (resulting in BROKEN build)?

$ cat start-build.txt 
dileks     74717   74680  0 11:08 pts/1    00:00:00 /usr/bin/perf stat make V=1 -j4 LLVM=1 LLVM_IAS=1 PAHOLE=/opt/pahole/bin/pahole LOCALVERSION=-1-amd64-clang18-kcfi KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@gmail.com KBUILD_BUILD_TIMESTAMP=2024-06-30 bindeb-pkg KDEB_PKGVERSION=6.9.7-1~trixie+dileks1

Still works for me (LLVM_IAS=1 is the default, LLVM=.../bin/ is basically PATH=.../bin/:$PATH LLVM=1, and V=1 should have no functional difference in the build commands):

$ curl -LSso $TMP_BUILD_FOLDER/$(basename $PWD)/dist/.config https://github.com/user-attachments/files/16046445/config-6.9.7-1-amd64-clang18-kcfi.txt

$ perf stat make -skj"$(nproc)" \
      ARCH=x86_64 \
      KBUILD_BUILD_HOST=iniza \
      KBUILD_BUILD_TIMESTAMP=2024-06-30 \
      KBUILD_BUILD_USER=sedat.dilek@gmail.com \
      KDEB_PKGVERSION=6.9.7-1~trixie+dileks1 \
      LLVM=$CBL_LLVM_TC_STORE/18.1.8/bin/ \
      LOCALVERSION=-1-amd64-clang18-kcfi \
      O=$TMP_BUILD_FOLDER/$(basename $PWD)/dist \
      PAHOLE=$TMP_BUILD_FOLDER/pahole/pahole \
      olddefconfig bindeb-pkg
dpkg-buildpackage: info: source package linux-upstream
dpkg-buildpackage: info: source version 6.9.7-1~trixie+dileks1
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by sedat.dilek@gmail.com <sedat.dilek@gmail.com@iniza>
dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match CC system type x86_64-unknown-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 make -f debian/rules binary
dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_6.9.7-1~trixie+dileks1_amd64.deb'.
dpkg-deb: building package 'linux-headers-6.9.7-1-amd64-clang18-kcfi' in '../linux-headers-6.9.7-1-amd64-clang18-kcfi_6.9.7-1~trixie+dileks1_amd64.deb'.
dpkg-deb: building package 'linux-image-6.9.7-1-amd64-clang18-kcfi' in '../linux-image-6.9.7-1-amd64-clang18-kcfi_6.9.7-1~trixie+dileks1_amd64.deb'.
dpkg-deb: building package 'linux-image-6.9.7-1-amd64-clang18-kcfi-dbg' in '../linux-image-6.9.7-1-amd64-clang18-kcfi-dbg_6.9.7-1~trixie+dileks1_amd64.deb'.
 dpkg-genbuildinfo --build=binary -O../linux-upstream_6.9.7-1~trixie+dileks1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../linux-upstream_6.9.7-1~trixie+dileks1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)

 Performance counter stats for 'make -skj64 ARCH=x86_64 KBUILD_BUILD_HOST=iniza KBUILD_BUILD_TIMESTAMP=2024-06-30 KBUILD_BUILD_USER=sedat.dilek@gmail.com KDEB_PKGVERSION=6.9.7-1~trixie+dileks1 LLVM=/home/nathan/cbl/toolchains/llvm/18.1.8/bin/ LOCALVERSION=-1-amd64-clang18-kcfi O=/home/nathan/tmp/build/linux-stable-6.9/dist PAHOLE=/home/nathan/tmp/build/pahole/pahole olddefconfig bindeb-pkg':

       27288555.47 msec task-clock:u                     #   43.277 CPUs utilized
                 0      context-switches:u               #    0.000 /sec
                 0      cpu-migrations:u                 #    0.000 /sec
         472319100      page-faults:u                    #   17.308 K/sec
    69566562715868      cycles:u                         #    2.549 GHz                      (83.40%)
      247388810046      stalled-cycles-frontend:u        #    0.36% frontend cycles idle     (83.40%)
     4764232804922      stalled-cycles-backend:u         #    6.85% backend cycles idle      (83.40%)
    79339433648114      instructions:u                   #    1.14  insn per cycle
                                                  #    0.06  stalled cycles per insn  (83.40%)
    14201504201951      branches:u                       #  520.420 M/sec                    (83.40%)
      518065461737      branch-misses:u                  #    3.65% of all branches          (83.40%)

     630.561244121 seconds time elapsed

   23257.573169000 seconds user
    3391.708592000 seconds sys
dileks commented 3 months ago

@nathanchance Thanks for the build and testing.

For my first build I reverted this commit (the BROKEN build):

$ git revert f1feed67c79e
( Revert "kbuild: Remove support for Clang's ThinLTO caching" )

In the upstream report you will find this information - here in this issue I forgot to mention it.

nathanchance commented 3 months ago

For my first build I reverted this commit (the BROKEN build):

$ git revert f1feed67c79e
( Revert "kbuild: Remove support for Clang's ThinLTO caching" )

In the upstream report you will find this information - here in this issue I forgot to mention it.

Can you try removing .thinlto-cache (or moving it to .thinlto-cache.bak or something) and seeing if this reproduces with a clean cache?

dileks commented 3 months ago

@nathanchance

Did you get a build-error with commit f1feed67c79e ("kbuild: Remove support for Clang's ThinLTO caching") reverted on top of Linux v6.9.7?

When - in the build-process - shall I remove .thinlto-cache directory?

nathanchance commented 3 months ago

Did you get a build-error with commit f1feed67c79e ("kbuild: Remove support for Clang's ThinLTO caching") reverted on top of Linux v6.9.7?

No, either on the first revert or a rebuild using the cache. If you want to run with that change reverted, you are free to do so, but since it was removed due to known bugs, supporting it will be done on a best effort basis.

When - in the build-process - shall I remove .thinlto-cache directory?

Do it before the build so that it is created from scratch from that build.

MaskRay commented 3 months ago

BROKEN linux-config is attached. config-6.9.7-1-amd64-clang18-kcfi.txt

Is there a complete reproduce that doesn't require knowledge about the kernel build system ? :)

dileks commented 3 months ago

Did you get a build-error with commit f1feed67c79e ("kbuild: Remove support for Clang's ThinLTO caching") reverted on top of Linux v6.9.7?

No, either on the first revert or a rebuild using the cache. If you want to run with that change reverted, you are free to do so, but since it was removed due to known bugs, supporting it will be done on a best effort basis.

My initial motivation was to see the impact of...

"kbuild: Remove support for Clang's ThinLTO caching"
https://git.kernel.org/linus/f1feed67c79ed8c6fc106960ba345bacdd53bf35

That commit says:

  Summary
    With ThinLTO cache ran
      1.21 ± 0.00 times faster than Without ThinLTO cache

...to the build-time on my Debian/unstable AMD64 system.

That commit was applied to Linux v6.9 series and others.

As reported in https://github.com/ClangBuiltLinux/linux/issues/2021#issuecomment-2198809075 - for me it has NO IMPACT.

18013.732280936 vs. 18058.162038615 [seconds time elapsed]

The big advantage is the reduction by 6GB in disc-usage - not using thinlto-caching.

For me carrying the revert is like riding a DEAD horse.

When - in the build-process - shall I remove .thinlto-cache directory?

Do it before the build so that it is created from scratch from that build.

Before a build, I am always doing a make distclean (which removes .thinlto-cache directory) followed by a check via git status -s.

It's up to you if you want to test the BROKEN scenario.

I will re-test with upcoming Linux v6.9.8 - I will use VANILLA stable version - no modifications. A VANILLA setup is reproducible.

nathanchance commented 3 months ago

If you do a distclean in between builds then I don't really understand how f1feed67c79ed8c6fc106960ba345bacdd53bf35 could really have any impact on this particular issue... I don't know, consider seeing if this is reproducible for you on your next build because I suspect it was just a one-time/transient failure.

dileks commented 3 months ago

@nathanchance

I am very thankful for your precious life-time and feedback.

INFO: I have deferred updates to my Debian/unstable AMD64 system to test this all.

NOTE: A build takes here approx. 18000 secs = 300 mins = 5 hrs (disabled amdgpu + nouveau kernel-modules).

With Linux version 6.9.8, I'll be happy to provide further feedback.

With Linux version 6.10-rc7 I'll switch to 6.10 series soon.

You can wait for my feedback or CLOSE this as wont-fix or not-reproducible.

dileks commented 3 months ago

Released 35 mins ago.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=v6.9.8

dileks commented 3 months ago

@nathanchance @masahir0y You happen to know how to how to just test for amdgpu.ko kernel-module - avoid a full build? Build-system (kbuild) changed a lot - Linux series 6.4 was the series before 6.8 in my testings (current: 6.9).

Normally, I would expect to work - but I had IIRC no success:

$ curl -LSso .config https://github.com/user-attachments/files/16046445/config-6.9.7-1-amd64-clang18-kcfi.txt

$ make -skj"$(nproc)" ARCH=ARCH=x86_64 LLVM=1 olddefconfig drivers/gpu/drm/amd/amdgpu/amdgpu.ko

UPDATE: Maybe it should be M=drivers/gpu/drm/amd/amdgpu/amdgpu.ko

nathanchance commented 2 months ago

You happen to know how to how to just test for amdgpu.ko kernel-module - avoid a full build? Build-system (kbuild) changed a lot - Linux series 6.4 was the series before 6.8 in my testings (current: 6.9).

Normally, I would expect to work - but I had IIRC no success:

$ curl -LSso .config https://github.com/user-attachments/files/16046445/config-6.9.7-1-amd64-clang18-kcfi.txt

$ make -skj"$(nproc)" ARCH=ARCH=x86_64 LLVM=1 olddefconfig drivers/gpu/drm/amd/amdgpu/amdgpu.ko

UPDATE: Maybe it should be M=drivers/gpu/drm/amd/amdgpu/amdgpu.ko

FWIW, your ARCH variable is messed up above, I am not sure if that has anything to do with it.

Otherwise, if you have all your previous build artifacts around, your command should work to my understanding. If you do not have vmlinux and your other modules, I think you have to figure out what modules amdgpu.ko depends on and build them plus vmlinux? Might just be better off rebuilding everything at that point.

dileks commented 2 months ago

Looks good:

dileks@iniza:~/src/linux/git$ /usr/bin/perf stat make -skj"$(nproc)" \
      ARCH=x86_64 \
      LLVM=1 \
      LLVM=/opt/llvm/bin/ \
      PAHOLE=/opt/pahole/bin/pahole \
      KBUILD_BUILD_HOST=iniza \
      KBUILD_BUILD_TIMESTAMP=2024-07-11 \
      KBUILD_BUILD_USER=sedat.dilek@gmail.com \
      KDEB_PKGVERSION=6.9.9-1~trixie+dileks1 \
      LOCALVERSION=-1-amd64-clang18-kcfi \
      olddefconfig bindeb-pkg
dpkg-buildpackage: Information: Quellpaket linux-upstream
dpkg-buildpackage: Information: Quellversion 6.9.9-1~trixie+dileks1
dpkg-buildpackage: Information: Quelldistribution trixie
dpkg-buildpackage: Information: Quelle geändert durch sedat.dilek@gmail.com <sedat.dilek@gmail.com@iniza>
dpkg-architecture: Warnung: angegebener GNU-Systemtyp x86_64-linux-gnu passt nicht zu CC-Systemtyp x86_64-unknown-linux-gnu, versuchen Sie, eine korrekte CC-Umgebungsvariable zu setzen
dpkg-buildpackage: Information: Host-Architektur amd64
 dpkg-source --before-build .
 make -f debian/rules binary
dpkg-deb: Paket »linux-libc-dev« wird in »../linux-libc-dev_6.9.9-1~trixie+dileks1_amd64.deb« gebaut.
dpkg-deb: Paket »linux-headers-6.9.9-1-amd64-clang18-kcfi« wird in »../linux-headers-6.9.9-1-amd64-clang18-kcfi_6.9.9-1~trixie+dileks1_amd64.deb« gebaut.
dpkg-deb: Paket »linux-image-6.9.9-1-amd64-clang18-kcfi« wird in »../linux-image-6.9.9-1-amd64-clang18-kcfi_6.9.9-1~trixie+dileks1_amd64.deb« gebaut.
dpkg-deb: Paket »linux-image-6.9.9-1-amd64-clang18-kcfi-dbg« wird in »../linux-image-6.9.9-1-amd64-clang18-kcfi-dbg_6.9.9-1~trixie+dileks1_amd64.deb« gebaut.
 dpkg-genbuildinfo --build=binary -O../linux-upstream_6.9.9-1~trixie+dileks1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../linux-upstream_6.9.9-1~trixie+dileks1_amd64.changes
dpkg-genchanges: Information: Binärpaket(e) hochzuladen (kein Quellcode enthalten)
 dpkg-source --after-build .
dpkg-buildpackage: Information: Binärpaket(e) hochzuladen (keine Quelle enthalten)

 Performance counter stats for 'make -skj4 ARCH=x86_64 LLVM=1 LLVM=/opt/llvm/bin/ PAHOLE=/opt/pahole/bin/pahole KBUILD_BUILD_HOST=iniza KBUILD_BUILD_TIMESTAMP=2024-07-11 KBUILD_BUILD_USER=sedat.dilek@gmail.com KDEB_PKGVERSION=6.9.9-1~trixie+dileks1 LOCALVERSION=-1-amd64-clang18-kcfi olddefconfig bindeb-pkg':

     62.384.148,78 msec task-clock                       #    3,502 CPUs utilized             
         9.522.803      context-switches                 #  152,648 /sec                      
           399.787      cpu-migrations                   #    6,408 /sec                      
       418.301.513      page-faults                      #    6,705 K/sec                     
110.413.179.023.843      cycles                           #    1,770 GHz                       
80.197.967.148.854      stalled-cycles-frontend          #   72,63% frontend cycles idle      
57.293.441.338.130      stalled-cycles-backend           #   51,89% backend cycles idle       
76.914.270.008.071      instructions                     #    0,70  insn per cycle            
                                                  #    1,04  stalled cycles per insn   
13.759.268.963.596      branches                         #  220,557 M/sec                     
   720.289.010.490      branch-misses                    #    5,23% of all branches           

   17815,343017148 seconds time elapsed

   58031,651229000 seconds user
    4327,416321000 seconds sys
dileks commented 2 months ago

Looks like Debian does NOT pass ARCH=x86_64:

$ head -10 /boot/config-6.9.8-amd64 
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.9.8 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="x86_64-linux-gnu-gcc-13 (Debian 13.3.0-1) 13.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24250
dileks commented 2 months ago

Build-script:

#!/bin/sh

export LANG=C
export LC_ALL=C

export DEBFULLNAME="Sedat Dilek"
export DEBEMAIL="sedat.dilek@gmail.com"

echo 0 | sudo tee /proc/sys/kernel/kptr_restrict /proc/sys/kernel/perf_event_paranoid

cd git

/usr/bin/perf stat \
        make -skj4 \
        ARCH=x86_64 \
        LLVM=1 \
        LLVM=/opt/llvm/bin/ \
        PAHOLE=/opt/pahole/bin/pahole \
        KBUILD_BUILD_HOST=iniza \
        KBUILD_BUILD_USER=sedat.dilek@gmail.com \
        KBUILD_BUILD_TIMESTAMP=2024-07-19 \
        KDEB_PKGVERSION=6.9.10-1~trixie+dileks1 \
        LOCALVERSION=-1-amd64-clang18-kcfi \
        olddefconfig \
        bindeb-pkg

Result:

0
dpkg-buildpackage: info: source package linux-upstream
dpkg-buildpackage: info: source version 6.9.10-1~trixie+dileks1
dpkg-buildpackage: info: source distribution trixie
dpkg-buildpackage: info: source changed by Sedat Dilek <sedat.dilek@gmail.com>
dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match CC system type x86_64-unknown-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 make -f debian/rules binary
dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_6.9.10-1~trixie+dileks1_amd64.deb'.
dpkg-deb: building package 'linux-headers-6.9.10-1-amd64-clang18-kcfi' in '../linux-headers-6.9.10-1-amd64-clang18-kcfi_6.9.10-1~trixie+dileks1_amd64.deb'.
dpkg-deb: building package 'linux-image-6.9.10-1-amd64-clang18-kcfi' in '../linux-image-6.9.10-1-amd64-clang18-kcfi_6.9.10-1~trixie+dileks1_amd64.deb'.
dpkg-deb: building package 'linux-image-6.9.10-1-amd64-clang18-kcfi-dbg' in '../linux-image-6.9.10-1-amd64-clang18-kcfi-dbg_6.9.10-1~trixie+dileks1_amd64.deb'.
 dpkg-genbuildinfo --build=binary -O../linux-upstream_6.9.10-1~trixie+dileks1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../linux-upstream_6.9.10-1~trixie+dileks1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)

 Performance counter stats for 'make -skj4 ARCH=x86_64 LLVM=1 LLVM=/opt/llvm/bin/ PAHOLE=/opt/pahole/bin/pahole KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@gmail.com KBUILD_BUILD_TIMESTAMP=2024-07-19 KDEB_PKGVERSION=6.9.10-1~trixie+dileks1 LOCALVERSION=-1-amd64-clang18-kcfi olddefconfig bindeb-pkg':

       71705925.21 msec task-clock                       #    3.507 CPUs utilized             
          10802974      context-switches                 #  150.657 /sec                      
            399363      cpu-migrations                   #    5.569 /sec                      
         450432145      page-faults                      #    6.282 K/sec                     
   120858643594499      cycles                           #    1.685 GHz                       
    87948123382858      stalled-cycles-frontend          #   72.77% frontend cycles idle      
    62992920057076      stalled-cycles-backend           #   52.12% backend cycles idle       
    83718868431141      instructions                     #    0.69  insn per cycle            
                                                  #    1.05  stalled cycles per insn   
    14949749651103      branches                         #  208.487 M/sec                     
      787382199300      branch-misses                    #    5.27% of all branches           

   20448.121470122 seconds time elapsed

   66754.973383000 seconds user
    4913.943535000 seconds sys

@nathanchance Looks like this is NOT REPRODUCIBLE - Feel free to CLOSE #2034 and #2035. Thanks for your help.

config-6.9.10-1-amd64-clang18-kcfi.txt

nathanchance commented 2 months ago

Cheers, thanks for taking another look :)