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: <45f76c2f-924c-92bc-05b9-683c8d253c66@linux.intel.com>
Date: Fri, 10 May 2024 17:11:38 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Christoph Fritz <christoph.fritz@...dev.de>
cc: Jiri Slaby <jirislaby@...nel.org>, 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 03/11] treewide, serdev: add flags argument to
 receive_buf()

On Thu, 9 May 2024, Christoph Fritz wrote:

> For serdev device drivers to be able to detect TTY_BREAK and other flags
> in the buffer, pass the flag buffer pointer down to serdev its receive
> function and update all drivers using it.
> 
> The changes were mostly done using the following Coccinelle
> semantic patch:
> 
> // <smpl>
> @ rule1 @
> identifier fn;
> identifier opsname;
> @@
> struct serdev_device_ops opsname = {
> 	.receive_buf = fn,
> };
> @@
> identifier rule1.fn;
> parameter E1, E2, E3;
> typedef u8;
> @@
>   fn(E1, E2,
> + const u8 *flags,
>   E3)
>   { ... }
> // </smpl>
> 
> Signed-off-by: Christoph Fritz <christoph.fritz@...dev.de>

> + * @receive_buf:	Function called with data received from device (char
> + *			buffer), flags buffer (%TTY_NORMAL, %TTY_BREAK, etc)
> + *			and number of bytes;
>   *			returns number of bytes accepted; may sleep.
>   * @write_wakeup:	Function called when ready to transmit more data; must
>   *			not sleep.
>   */
>  struct serdev_device_ops {
> -	size_t (*receive_buf)(struct serdev_device *, const u8 *, size_t);
> +	size_t (*receive_buf)(struct serdev_device *, const u8 *, const u8 *,
> +			      size_t);

These parameters should be named now that they're being touched.

With that done,

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ