lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4bfb6c46-6f93-431b-9a8c-038bc7f77241@163.com>
Date: Tue, 7 Jan 2025 23:44:21 +0800
From: Hans Zhang <18255117159@....com>
To: Niklas Cassel <cassel@...nel.org>
Cc: manivannan.sadhasivam@...aro.org, kw@...ux.com, kishon@...nel.org,
 arnd@...db.de, gregkh@...uxfoundation.org, linux-pci@...r.kernel.org,
 linux-kernel@...r.kernel.org, rockswang7@...il.com
Subject: Re: [v8] misc: pci_endpoint_test: Fix overflow of bar_size



On 2025/1/7 19:47, Niklas Cassel wrote:

Hi Niklas,

> The error:
> drivers/misc/pci_endpoint_test.c:315: undefined reference to `__udivmoddi4'
> sounds like the compiler is using a specialized instruction to do both div
> and mod in one. By removing the mod in patch 1/2, I expect that patch 2/2
> will no longer get this error.

The __udivmoddi4 may be the way div and mod are combined.

Delete remain's patch 1/2 according to your suggestion. I compiled it as 
a KO module for an experiment.

There are still __udivdi3 errors, so the do_div API must be used.

zhb@zhb:/media/zhb/hans/code/kernel_org/hans$ make
make -C /media/zhb/hans/code/kernel_org/linux/ 
M=/media/zhb/hans/code/kernel_org/hans modules
make[1]: Entering directory '/media/zhb/hans/code/kernel_org/linux'
make[2]: Entering directory '/media/zhb/hans/code/kernel_org/hans'
   CC [M]  pci_endpoint_test.o
   MODPOST Module.symvers
ERROR: modpost: "__udivdi3" [pci_endpoint_test.ko] undefined!
make[4]: *** 
[/media/zhb/hans/code/kernel_org/linux/scripts/Makefile.modpost:145: 
Module.symvers] Error 1
make[3]: *** [/media/zhb/hans/code/kernel_org/linux/Makefile:1939: 
modpost] Error 2
make[2]: *** [/media/zhb/hans/code/kernel_org/linux/Makefile:251: 
__sub-make] Error 2
make[2]: Leaving directory '/media/zhb/hans/code/kernel_org/hans'
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Leaving directory '/media/zhb/hans/code/kernel_org/linux'
make: *** [Makefile:10: kernel_modules] Error 2

Best regards
Hans


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ