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: <7e6f8929-6665-45af-b01b-167a1aa80305@web.de>
Date: Wed, 25 Jun 2025 18:23:15 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Vincent Mailhol <mailhol.vincent@...adoo.fr>, linux-can@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org,
 Chen Ni <nichen@...as.ac.cn>, Marc Kleine-Budde <mkl@...gutronix.de>
Subject: Re: can: ucan: Use usb_endpoint_type() rather than duplicating its
 implementation

> A real quick search shows me that this ucan driver is not an isolated case.
> Here is an example:
> 
> https://elixir.bootlin.com/linux/v6.16-rc3/source/drivers/media/rc/imon.c#L2137-L2148

Thanks that you pointed another implementation detail out from
the function “imon_find_endpoints”.


> But it does not seem to occur so often either. So not sure what is the best:
> do a manual hunt

Unlikely.

I am unsure if such an aspect would become relevant for a code review
by other contributors.


>                  or write a coccinelle checker.

I would find it more convenient to achieve corresponding adjustments
to some degree with the help of such a development tool.
I constructed scripts for the semantic patch language accordingly.


>> Can the functions “usb_endpoint_is_bulk_in” and “usb_endpoint_is_bulk_out”
>> be applied here?
>> https://elixir.bootlin.com/linux/v6.16-rc3/source/include/uapi/linux/usb/ch9.h#L572-L595
> 
> Further simplification, nice :)
> 
> I didn't see that last one, so glad you found what seems to be the optimal solution!
I am unsure if the check reordering would be desirable for this function implementation.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ