Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1005404: Kernel modules fail to build with Linux 5.16 onward

229 views
Skip to first unread message

Ben Hutchings

unread,
Feb 12, 2022, 5:00:03 PM2/12/22
to
Source: openafs
Version: 1.8.2-1+deb10u1
Severity: grave
Tags: patch upstream

The openafs modules fail to build, with the compiler reporting that
"stdarg.h" is not found.

This is due to an intentional change in Linux 5.16 removing user-space
headers from the kernel include path:
<https://git.kernel.org/linus/04e85bbf71c9072dcf0ad9a7150495d72461105c>.

Kernel code must use <linux/stdarg.h> instead of <stdarg.h>.

The attached patch fixes this and allows the build to complete.

Ben.

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'oldstable-updates'), (500, 'unstable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-3-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
openafs-fix-stdarg.h-inclusion-on-linux.patch

Benjamin Kaduk

unread,
Feb 13, 2022, 9:10:03 PM2/13/22
to
Hi Ben,

Thanks for detecting and reporting the build errors.
I'm a bit confused as to how this is "grave", though -- I would have
classified it as merely "serious" as for, e.g., 970258 and 995134.

For upstream, we went with a slightly different patch owing to the
unreliability of the linux version macros due to distros backporting many
patches --
https://github.com/openafs/openafs/commit/3daa6e97330d23ae46c4389e4041c61c1a1d76d9

I will take this as a trigger to package upstream 1.8.8.1 that includes the
fix.

-Ben
> From: Ben Hutchings <be...@debian.org>
> Date: Sat, 12 Feb 2022 22:25:47 +0100
> Subject: openafs: Fix <stdarg.h> inclusion on Linux
>
> There was an intentional change in Linux 5.16 removing user-space
> headers from the kernel include path:
> <https://git.kernel.org/linus/04e85bbf71c9072dcf0ad9a7150495d72461105c>.
>
> Kernel code must use <linux/stdarg.h> instead of <stdarg.h>.
> ---
> --- a/src/rx/rx_kcommon.h
> +++ b/src/rx/rx_kcommon.h
> @@ -145,6 +145,8 @@ typedef unsigned short etap_event_t;
> /* if sys/systm.h includes varargs.h some versions of solaris have conflicts */
> # if defined(AFS_FBSD_ENV)
> # include "machine/stdarg.h"
> +# elif defined(AFS_LINUX26_ENV) && LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)
> +# include <linux/stdarg.h>
> # else
> # include "stdarg.h"
> # endif
0 new messages