Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-05 Thread Andreas Beckmann

Control: reassign -1 linux-kbuild-6.3 6.3.11-1

On Wed, 5 Jul 2023 13:52:25 +0200 Bastian Blank  wrote:

On Wed, Jul 05, 2023 at 10:53:19AM +0200, Vincent Lefevre wrote:
> On 2023-07-04 16:13:56 +0200, Andreas Beckmann wrote:
> > This needs to be fixed before linux 6.3.0-2-* can migrate to testing,
> > otherwise it will break dkms module building for everyone still having
> > linux-headers-6.3.0-1-* installed (which is probably for the currently
> > running kernel).
> On one of my machines, the upgrade was fine, but this is because the
> NVIDIA kernel module wasn't rebuilt for the 6.3.0-1 kernel (despite
> I have autoinstall_all_kernels="1" in /etc/dkms/framework.conf). So
> I suppose that this bug would affect the machine only if the NVIDIA
> packages are upgraded.


This is an independent issue. Please file a separate bug for it.


This is dkms failing to build a module for an incompatible kernel.
Nothing can be done by the kernel to fix this as the kernel internal
interfaces are not stable, the module needs to be upgrade accordingly to
support the new interface.


This bug has nothing to do with dkms or the nvidia driver.
It's an incompatibility between linux-kbuild-6.3 6.3.11-1 and 
linux-headers-6.3.0-[01]-common{,-rt} (<< 6.3.11). The old header 
packages don't have asm/orc_header.h (that is available from 
linux-headers-6.3.0-2-common{,-rt}), but the scripts in the new 
linux-kbuild-6.3 generate code that includes the header, breaking the 
build of the any dkms module against the older headers. (This is the 
very first time I observed such breakage in the kernel header packages.)
Having this package combination installed (linux-kbuild-6.3 + 
linux-headers-6.3.0-1-common + linux-headers-6.3.0-2-common) is very 
likely for people tracking testing or sid.


Therefore please add Breaks against the incompatible headers.
Maybe even a NEWS entry would be appropriate to warn people upgrading 
from 6.3.0-1 to 6.3.0-2 that the headers for the older kernel are going 
to be removed and as a consequence all dkms modules will be removed for 
this old kernel, which may make the system unbootable into this old kernel.


Andreas



Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-05 Thread Ben Hutchings
On Wed, 2023-07-05 at 13:52 +0200, Bastian Blank wrote:
> Control: reassign -1 dkms
> 
> On Wed, Jul 05, 2023 at 10:53:19AM +0200, Vincent Lefevre wrote:
> > On 2023-07-04 16:13:56 +0200, Andreas Beckmann wrote:
> > > This needs to be fixed before linux 6.3.0-2-* can migrate to testing,
> > > otherwise it will break dkms module building for everyone still having
> > > linux-headers-6.3.0-1-* installed (which is probably for the currently
> > > running kernel).
> > On one of my machines, the upgrade was fine, but this is because the
> > NVIDIA kernel module wasn't rebuilt for the 6.3.0-1 kernel (despite
> > I have autoinstall_all_kernels="1" in /etc/dkms/framework.conf). So
> > I suppose that this bug would affect the machine only if the NVIDIA
> > packages are upgraded.
> 
> This is dkms failing to build a module for an incompatible kernel.
> Nothing can be done by the kernel to fix this as the kernel internal
> interfaces are not stable, the module needs to be upgrade accordingly to
> support the new interface.

No, this is modpost inserting a reference to a new header.  The
incompatibility is in our own packages.

Ben.

-- 
Ben Hutchings
Kids!  Bringing about Armageddon can be dangerous.  Do not attempt it
in your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'



signature.asc
Description: This is a digitally signed message part


Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-05 Thread Bastian Blank
Control: reassign -1 dkms

On Wed, Jul 05, 2023 at 10:53:19AM +0200, Vincent Lefevre wrote:
> On 2023-07-04 16:13:56 +0200, Andreas Beckmann wrote:
> > This needs to be fixed before linux 6.3.0-2-* can migrate to testing,
> > otherwise it will break dkms module building for everyone still having
> > linux-headers-6.3.0-1-* installed (which is probably for the currently
> > running kernel).
> On one of my machines, the upgrade was fine, but this is because the
> NVIDIA kernel module wasn't rebuilt for the 6.3.0-1 kernel (despite
> I have autoinstall_all_kernels="1" in /etc/dkms/framework.conf). So
> I suppose that this bug would affect the machine only if the NVIDIA
> packages are upgraded.

This is dkms failing to build a module for an incompatible kernel.
Nothing can be done by the kernel to fix this as the kernel internal
interfaces are not stable, the module needs to be upgrade accordingly to
support the new interface.

Bastian

-- 
Where there's no emotion, there's no motive for violence.
-- Spock, "Dagger of the Mind", stardate 2715.1



Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-05 Thread Vincent Lefevre
On 2023-07-04 16:13:56 +0200, Andreas Beckmann wrote:
> This needs to be fixed before linux 6.3.0-2-* can migrate to testing,
> otherwise it will break dkms module building for everyone still having
> linux-headers-6.3.0-1-* installed (which is probably for the currently
> running kernel).

On one of my machines, the upgrade was fine, but this is because the
NVIDIA kernel module wasn't rebuilt for the 6.3.0-1 kernel (despite
I have autoinstall_all_kernels="1" in /etc/dkms/framework.conf). So
I suppose that this bug would affect the machine only if the NVIDIA
packages are upgraded.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-04 Thread Andreas Beckmann

Control: reassign -1 linux-kbuild-6.3 6.3.11-1
Control: retitle -1 linux-kbuild-6.3: missing Breaks: 
linux-headers-6.3.0-1-common, ...
Control: affects -1 + nvidia-kernel-dkms
Control: severity -1 serious

[resending, the previous attempt didn't have the bug in To/Cc]

This error can be easily be reproduced by installing
linux-headers-amd64 and dkms-test-dkms in sid.
Can be reproduced in testing by installing these packages
from testing and only linux-kbuild-6.3 from sid.

DKMS make.log for dkms_test-1.0 for kernel 6.3.0-1-amd64 (x86_64)
Sun Jul  2 22:41:19 UTC 2023
make: Entering directory '/usr/src/linux-headers-6.3.0-1-amd64'
  CC [M]  /var/lib/dkms/dkms_test/1.0/build/dkms_test.o
  MODPOST /var/lib/dkms/dkms_test/1.0/build/Module.symvers
  CC [M]  /var/lib/dkms/dkms_test/1.0/build/dkms_test.mod.o
/var/lib/dkms/dkms_test/1.0/build/dkms_test.mod.c:10:10: fatal error: 
asm/orc_header.h: No such file or directory
   10 | #include 
  |  ^~
compilation terminated.
make[1]: *** 
[/usr/src/linux-headers-6.3.0-1-common/scripts/Makefile.modfinal:29: 
/var/lib/dkms/dkms_test/1.0/build/dkms_test.mod.o] Error 1
make: *** [/usr/src/linux-headers-6.3.0-1-common/Makefile:1967: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-6.3.0-1-amd64'

Another instance of this bug is the dkms autopkgtest regression on amd64:
https://ci.debian.net/data/autopkgtest/testing/amd64/d/dkms/35086312/log.gz

My suggestion is to add Breaks against these packages:

linux-headers-6.3.0-1-common (<< 6.3.11)
linux-headers-6.3.0-1-common-rt (<< 6.3.11)
linux-headers-6.3.0-0-common (<< 6.3.11)
linux-headers-6.3.0-0-common-rt (<< 6.3.11)

These can be removed for Linux 6.4, but maybe 6.4 needs
in linux-kbuild-6.4 similar Breaks against

linux-headers-6.4.0-0-common (<< $ver)
linux-headers-6.4.0-0-common-rt (<< $ver)

if a similar change as the one in 6.3.0-2 is yet to be
applied to 6.4.


This needs to be fixed before linux 6.3.0-2-* can migrate to testing,
otherwise it will break dkms module building for everyone still having
linux-headers-6.3.0-1-* installed (which is probably for the currently
running kernel).


Andreas



Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-03 Thread Andreas Beckmann
as a workaround please downgrade linux-kbuild-6.3 to the version from 
testing (6.3.7-1)


Andreas



Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-03 Thread Richard A Burton
Fully updated sid, on amd64.

Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version  Architecture Description
+++----===
ii  linux-kbuild-6.3 6.3.11-1 amd64Kbuild infrastructure for
Linux 6.3


Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-02 Thread Andreas Beckmann

which version of linux-kbuild-6.3 do you have installed?
(dpkg -l linux-kbuild-6.3)


Andreas



Bug#1040178: Kernel modules will not build, missing asm/orc_header.h

2023-07-02 Thread Richard A Burton
Package: nvidia-kernel-dkms

Version: 525.116.04-1


Setting up nvidia-kernel-dkms (525.116.04-1) ...
Removing old nvidia-current-525.116.04 DKMS files...
Deleting module nvidia-current-525.116.04 completely from the DKMS tree.
Loading new nvidia-current-525.116.04 DKMS files...
Building for 6.3.0-1-amd64
Building initial module for 6.3.0-1-amd64
Error! Bad return status for module build on kernel: 6.3.0-1-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/525.116.04/build/make.log for
more information.
dpkg: error processing package nvidia-kernel-dkms (--configure):
 installed nvidia-kernel-dkms package post-installation script
subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver:
 nvidia-driver depends on nvidia-kernel-dkms (= 525.116.04-1) |
nvidia-kernel-525.116.04 | nvidia-open-kernel-525.116.04 |
nvidia-open-kernel-525.116.04; however:
  Package nvidia-kernel-dkms is not configured yet.
  Package nvidia-kernel-525.116.04 is not installed.
  Package nvidia-kernel-dkms which provides nvidia-kernel-525.116.04
is not configured yet.
  Package nvidia-open-kernel-525.116.04 is not installed.
  Package nvidia-open-kernel-525.116.04 is not installed.

dpkg: error processing package nvidia-driver (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.37-3) ...
Errors were encountered while processing:
 nvidia-kernel-dkms
 nvidia-driver
E: Sub-process /usr/bin/dpkg returned an error code (1)



Build log ends with errors such as:
/var/lib/dkms/nvidia-current/525.116.04/build/nvidia-drm.mod.c:10:10:
fatal error: asm/orc_header.h: No such file or directory
   10 | #include 
  |  ^~
compilation terminated.