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-next>] [day] [month] [year] [list]
Date:   Tue, 14 Nov 2023 19:31:02 +0530
From:   Ayush Singh <ayushdevel1325@...il.com>
To:     greybus-dev@...ts.linaro.org
Cc:     Ayush Singh <ayushdevel1325@...il.com>, johan@...nel.org,
        elder@...nel.org, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org,
        kernel test robot <yujie.liu@...el.com>
Subject: [PATCH] greybus: gb-beagleplay: fix restricted __le16 degrades to integer warning

greybus message header->size are of type __le16, so to fix this warnings
we are using le16_to_cpu() macros.

Reported-by: kernel test robot <yujie.liu@...el.com>
Closes: https://lore.kernel.org/r/202311072329.Xogj7hGW-lkp@intel.com/
Signed-off-by: Ayush Singh <ayushdevel1325@...il.com>
---
 drivers/greybus/gb-beagleplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c
index 43318c1993ba..b3f47b5cbbfa 100644
--- a/drivers/greybus/gb-beagleplay.c
+++ b/drivers/greybus/gb-beagleplay.c
@@ -344,7 +344,7 @@ static int gb_message_send(struct gb_host_device *hd, u16 cport, struct gb_messa
 	dev_dbg(&hd->dev, "Sending greybus message with Operation %u, Type: %X on Cport %u",
 		msg->header->operation_id, msg->header->type, cport);
 
-	if (msg->header->size > RX_HDLC_PAYLOAD)
+	if (le16_to_cpu(msg->header->size) > RX_HDLC_PAYLOAD)
 		return dev_err_probe(&hd->dev, -E2BIG, "Greybus message too big");
 
 	memcpy(msg->header->pad, &cport, sizeof(cport));
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ