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: <20250820081011.11164-1-syhuang3@nuvoton.com>
Date: Wed, 20 Aug 2025 16:07:13 +0800
From: hsyemail2@...il.com
To: Oliver Neukum <oneukum@...e.com>,
	Johan Hovold <johan@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Sheng-Yuan Huang <syhuang3@...oton.com>
Subject: [PATCH v4 0/1] USB: serial: nct_usb_serial: add support for Nuvoton USB adapter

From: Sheng-Yuan Huang <syhuang3@...oton.com>

Hi everyone,
This patch is a revised version of the previous submission and includes
changes based on comments from Oliver.
I apologize for the delay in following up, as I’ve been tied up with some
ongoing work.
As requested, I’ve included a detailed explanation at the end of this cover
letter regarding the payload length handling logic. Thank you to Oliver for
the valuable feedback and suggestions provided in the previous review.

The main changes are as follows:

- Remove unnecessary index macros
- Add explicit cast to avoid overflow in command code bit-shifting
- Remove misleading baud rate warning (nct_set_baud())
- Use correct spinlock variant for sleepable context (nct_tiocmset_helper(),
  nct_serial_tiocmget(), and nct_close())
- Clarify and simplify payload length return logic (nct_serial_write_data())
- Remove NULL check for port and for write_urb/transfer_buffer
  (nct_serial_write())
- Use kzalloc for buffer allocation (nct_open())
- Add error handling for nct_vendor_write() calls (nct_open())
- Remove usb_kill_urb() (nct_close())
- Add buffer size check before accessing header (nct_usb_serial_read())

Regarding the handling of the payload length returned to the upper layer
in 'nct_serial_write_data()', as requested by Oliver:
Previously, I checked whether 'usb_submit_urb()' succeeded and only
subtracted the header size from the total length if the submission
was successful, since the upper layer only needs the payload length.  
After considering your feedback, I modified the code so that the return
value is now set directly based on the result of 'usb_submit_urb()'.  
The functionality remains the same, but I hope this version is more
straightforward. If you have any further suggestions or concerns, I would
sincerely appreciate your feedback.

Best regards,
Sheng-Yuan Huang

Sheng-Yuan Huang (1):
  USB: serial: nct_usb_serial: add support for Nuvoton USB adapter

 drivers/usb/serial/Kconfig          |   10 +
 drivers/usb/serial/Makefile         |    1 +
 drivers/usb/serial/nct_usb_serial.c | 1532 +++++++++++++++++++++++++++
 3 files changed, 1543 insertions(+)
 create mode 100644 drivers/usb/serial/nct_usb_serial.c

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ