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] [day] [month] [year] [list]
Message-ID: <PH0PR11MB758570724403EB405BED32CAF558A@PH0PR11MB7585.namprd11.prod.outlook.com>
Date: Sat, 26 Jul 2025 16:00:21 +0000
From: "K, Kiran" <kiran.k@...el.com>
To: Arnd Bergmann <arnd@...nel.org>, Marcel Holtmann <marcel@...tmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@...il.com>, "Devegowda, Chandrashekar"
	<chandrashekar.devegowda@...el.com>
CC: Arnd Bergmann <arnd@...db.de>, Vijay Satija <vijay.satija@...el.com>,
	Aluvala Sai Teja <aluvala.sai.teja@...el.com>,
	"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Bluetooth: btintel_pcie: avoid unguarded 64-bit division

Hi Arnd,

Thanks for the patch. I would like to amend this patch with - https://patchwork.kernel.org/project/bluetooth/patch/20250725090133.1358775-1-kiran.k@intel.com/

I will include your name as part of Signed-off-by tag. 

>-----Original Message-----
>From: Arnd Bergmann <arnd@...nel.org>
>Sent: Friday, July 25, 2025 2:37 PM
>To: Marcel Holtmann <marcel@...tmann.org>; Luiz Augusto von Dentz
><luiz.dentz@...il.com>; Devegowda, Chandrashekar
><chandrashekar.devegowda@...el.com>; K, Kiran <kiran.k@...el.com>
>Cc: Arnd Bergmann <arnd@...db.de>; Vijay Satija <vijay.satija@...el.com>;
>Aluvala Sai Teja <aluvala.sai.teja@...el.com>; linux-
>bluetooth@...r.kernel.org; linux-kernel@...r.kernel.org
>Subject: [PATCH] Bluetooth: btintel_pcie: avoid unguarded 64-bit division
>
>From: Arnd Bergmann <arnd@...db.de>
>
>Directly dividing a 64-bit value is not allowed on 32-bit architectures in the
>kernel.
>
>arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/bluetooth/btintel_pcie.o:
>in function `btintel_pcie_suspend_late':
>btintel_pcie.c:(.text+0x224): undefined reference to `__aeabi_ldivmod'
>
>Since this is a ktime_t value and dividing by 1000 gives a microsecond number,
>just convert it into microseconds using the appropriate helper.
>
>Fixes: 33bb9b1ce6f6 ("Bluetooth: btintel_pcie: Add support for _suspend() /
>_resume()")
>Signed-off-by: Arnd Bergmann <arnd@...db.de>
>---
> drivers/bluetooth/btintel_pcie.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
>index 9792a49886ff..4dfd5365bb4e 100644
>--- a/drivers/bluetooth/btintel_pcie.c
>+++ b/drivers/bluetooth/btintel_pcie.c
>@@ -2607,7 +2607,7 @@ static int btintel_pcie_suspend_late(struct device
>*dev, pm_message_t mesg)
> 	btintel_pcie_wr_sleep_cntrl(data, dxstate);
> 	err = wait_event_timeout(data->gp0_wait_q, data->gp0_received,
>
>msecs_to_jiffies(BTINTEL_DEFAULT_INTR_TIMEOUT_MS));
>-	delta = ktime_to_ns(ktime_get() - start) / 1000;
>+	delta = ktime_to_us(ktime_get() - start);
>
> 	if (err == 0) {
> 		bt_dev_err(data->hdev, "Timeout (%u ms) on alive interrupt
>for D3 entry", @@ -2651,7 +2651,7 @@ static int btintel_pcie_resume(struct
>device *dev)
> 	btintel_pcie_wr_sleep_cntrl(data, BTINTEL_PCIE_STATE_D0);
> 	err = wait_event_timeout(data->gp0_wait_q, data->gp0_received,
>
>msecs_to_jiffies(BTINTEL_DEFAULT_INTR_TIMEOUT_MS));
>-	delta = ktime_to_ns(ktime_get() - start) / 1000;
>+	delta = ktime_to_us(ktime_get() - start);
>
> 	if (err == 0) {
> 		bt_dev_err(data->hdev, "Timeout (%u ms) on alive interrupt
>for D0 entry",
>--
>2.39.5

Thanks,
Kiran



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ