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]
Date: Mon, 13 May 2024 07:26:06 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 Christoph Fritz <christoph.fritz@...dev.de>
Cc: Simon Horman <horms@...nel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Marc Kleine-Budde <mkl@...gutronix.de>,
 Oliver Hartkopp <socketcan@...tkopp.net>,
 Vincent Mailhol <mailhol.vincent@...adoo.fr>,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Jiri Kosina <jikos@...nel.org>,
 Benjamin Tissoires <bentiss@...nel.org>, Sebastian Reichel <sre@...nel.org>,
 Linus Walleij <linus.walleij@...aro.org>,
 Andreas Lauser <andreas.lauser@...cedes-benz.com>,
 Jonathan Corbet <corbet@....net>, Pavel Pisa <pisa@....felk.cvut.cz>,
 linux-can@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
 devicetree@...r.kernel.org, linux-input@...r.kernel.org,
 linux-serial <linux-serial@...r.kernel.org>
Subject: Re: [PATCH v4 02/11] HID: hexLIN: Add support for USB LIN adapter

On 10. 05. 24, 15:46, Ilpo Järvinen wrote:
>> +	reinit_completion(&priv->wait_in_report);
>> +
>> +	n = hid_hw_output_report(priv->hid_dev, (__u8 *) out_report, len);
> 
> The usual is to not leave space between cast and what is being cast. I
> know hid functions seem to use __u8 but that's intended for uapi and in
> kernel, u8 should be used (somebody should eventually cleanup the hid
> function types too).

Apart from that, you are attached to USB, so this goes down to usbhid 
(the ll driver). Are you sure the put-const-away cast is right thing to 
do here? (usbhid passes it to usb_interrupt_msg().)

That is the only reason why you have the cast in there in the first place…

regards,
-- 
js


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ