Re: Build error with kernel from 2026-08-21
From: Jürgen Groß
Date: Fri Aug 21 2026 - 06:16:52 EST
On 21.08.26 11:35, Jiri Kosina wrote:
On Fri, 21 Aug 2026, Jiri Kosina wrote:
make[3]: *** [/home/gross/linux/head/scripts/Makefile.build:550: drivers]
Error 2
make[1]: Leaving directory '/home/gross/linux/head/jg/build/x86_32-yes'
make[2]: *** [/home/gross/linux/head/Makefile:2193: .] Error 2
make[1]: *** [/home/gross/linux/head/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2
[msr]~/linux/head> mk x86_32-yes
make O=jg/build/x86_32-yes CC=gcc-13 PYTHON3=python3.11
make[1]: Entering directory '/home/gross/linux/head/jg/build/x86_32-yes'
CC drivers/hid/hid-hyperv.o
In file included from /home/gross/linux/head/include/linux/string.h:383,
from
/home/gross/linux/head/arch/x86/include/asm/page_32.h:18,
from
/home/gross/linux/head/arch/x86/include/asm/page.h:14,
from
/home/gross/linux/head/arch/x86/include/asm/processor.h:20,
from
/home/gross/linux/head/arch/x86/include/asm/timex.h:5,
from /home/gross/linux/head/include/linux/timex.h:67,
from /home/gross/linux/head/include/linux/time32.h:13,
from /home/gross/linux/head/include/linux/time.h:60,
from /home/gross/linux/head/include/linux/stat.h:19,
from /home/gross/linux/head/include/linux/module.h:13,
from /home/gross/linux/head/drivers/hid/hid-hyperv.c:8:
In function ‘fortify_memset_chk’,
inlined from ‘mousevsc_device_info_valid_descriptor’ at
/home/gross/linux/ head/drivers/hid/hid-hyperv.c:691:2:
/home/gross/linux/head/include/linux/fortify-string.h:430:25: error: call
to
‘__write_overflow_field’ declared with attribute warning: detected write
beyond size of field (1st parameter); maybe use struct_group()?
[-Werror=attribute- warning]
430 | __write_overflow_field(p_size_field,
size);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘fortify_memset_chk’,
inlined from ‘mousevsc_device_info_report_desc_oob’ at
/home/gross/linux/ head/drivers/hid/hid-hyperv.c:717:2:
/home/gross/linux/head/include/linux/fortify-string.h:430:25: error: call
to
‘__write_overflow_field’ declared with attribute warning: detected write
beyond size of field (1st parameter); maybe use struct_group()?
[-Werror=attribute- warning]
430 | __write_overflow_field(p_size_field,
size);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [/home/gross/linux/head/scripts/Makefile.build:290:
drivers/hid/ hid-hyperv.o] Error 1
make[4]: *** [/home/gross/linux/head/scripts/Makefile.build:550:
drivers/hid] Error 2
make[3]: *** [/home/gross/linux/head/scripts/Makefile.build:550: drivers]
Error 2
make[2]: *** [/home/gross/linux/head/Makefile:2193: .] Error 2
make[1]: Leaving directory '/home/gross/linux/head/jg/build/x86_32-yes'
make[1]: *** [/home/gross/linux/head/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2
A git bisect flagged commit 83df7b5fa6735b5084ecd296a0f67208650ba497 to be
the
problematic patch.
Hi,
this was reported by syzbot two days ago. I asked it to test a candidate
fix [1], but it never responded back. Can you give it a quick shot in your
32bit build environment, please?
Thanks.
[1]
https://lore.kernel.org/all/s6r47sn1-pr1p-8s7r-o164-q27s2o40p9r1@xxxxxxxx/
BTW, I'm seeing the build failure in 64-bit environment, too.
Ah, that's actually a different issue than the syzbot-reported one. I'll
look into this one after I am done with the other build failure introduced
by the same commit.
Can you please test the one below? Thanks.
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 6579bd19da13..4a10b24da9fa 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -687,7 +687,7 @@ static void mousevsc_device_info_valid_descriptor(struct kunit *test)
info->hid_descriptor.bLength = sizeof(struct hid_descriptor);
info->hid_descriptor.rpt_desc.wDescriptorLength = cpu_to_le16(4);
- report = ((u8 *)&info->hid_descriptor) + info->hid_descriptor.bLength;
+ report = (u8 *)info + offsetof(struct synthhid_device_info, hid_descriptor) + info->hid_descriptor.bLength;
memset(report, 0x42, 4);
mousevsc_on_receive_device_info(input_dev, info, sizeof(*info) + 4);
@@ -713,7 +713,7 @@ static void mousevsc_device_info_report_desc_oob(struct kunit *test)
info->hid_descriptor.bLength = sizeof(struct hid_descriptor);
info->hid_descriptor.rpt_desc.wDescriptorLength = cpu_to_le16(64);
- report = ((u8 *)&info->hid_descriptor) + info->hid_descriptor.bLength;
+ report = (u8 *)info + offsetof(struct synthhid_device_info, hid_descriptor) + info->hid_descriptor.bLength;
memset(report, 0x42, 8);
mousevsc_on_receive_device_info(input_dev, info, sizeof(*info) + 8);
Yes, this is fixing the issue I'm seeing.
Juergen
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature