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]
Message-Id: <20250929-gs-usb-max-if-v1-1-e41b5c09133a@coelacanthus.name>
Date: Mon, 29 Sep 2025 19:10:01 +0800
From: Celeste Liu <uwu@...lacanthus.name>
To: Marc Kleine-Budde <mkl@...gutronix.de>, 
 Vincent Mailhol <mailhol.vincent@...adoo.fr>
Cc: Maximilian Schneider <max@...neidersoft.net>, 
 Henrik Brix Andersen <henrik@...xandersen.dk>, 
 Wolfgang Grandegger <wg@...ndegger.com>, linux-can@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Runcheng Lu <runcheng.lu@...icro.com>, 
 Celeste Liu <uwu@...lacanthus.name>
Subject: [PATCH] net/can/gs_usb: increase max interface to 255

This issue was found by Runcheng Lu when develop HSCanT USB to CAN FD
converter[1]. The original developers may have only 3 intefaces device to
test so they write 3 here and wait for future change.

During the HSCanT development, we actually used 4 interfaces, so the
limitation of 3 is not enough now. But just increase one is not
future-proofed. Since the channel type in gs_host_frame is u8, use 255
as max interface number should be safe.

[1]: https://github.com/cherry-embedded/HSCanT-hardware

Reported-by: Runcheng Lu <runcheng.lu@...icro.com>
Signed-off-by: Celeste Liu <uwu@...lacanthus.name>
---
 drivers/net/can/usb/gs_usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index c9482d6e947b0c7b033dc4f0c35f5b111e1bfd92..35fc257c19e57c1f33e03e7c86ea908d22400254 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -290,9 +290,9 @@ struct gs_host_frame {
 #define GS_NAPI_WEIGHT 32
 
 /* Maximum number of interfaces the driver supports per device.
- * Current hardware only supports 3 interfaces. The future may vary.
+ * The channel number type of gs_host_frame is u8, so max interfaces can be 255.
  */
-#define GS_MAX_INTF 3
+#define GS_MAX_INTF 255
 
 struct gs_tx_context {
 	struct gs_can *dev;

---
base-commit: e5f0a698b34ed76002dc5cff3804a61c80233a7a
change-id: 20250929-gs-usb-max-if-a304c83243e5

Best regards,
-- 
Celeste Liu <uwu@...lacanthus.name>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ