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] [day] [month] [year] [list]
Message-ID: <c3b29cc0-f352-468d-8030-00ed6de3e319@hartkopp.net>
Date: Sat, 20 Jan 2024 09:18:50 +0100
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Nicolas Maier <nicolas.maier.dev@...il.com>,
 Marc Kleine-Budde <mkl@...gutronix.de>, linux-can@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Jonathan Corbet <corbet@....net>,
 netdev@...r.kernel.org, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] can: bcm: add recvmsg flags for own, local and remote
 traffic

Hi Nicolas,

On 2024-01-14 15:08, Nicolas Maier wrote:
> v2:
> * add 'traffic_flags' parameter to bcm_rx_update_and_send and
>    bcm_rx_cmp_to_index, to put the flags in the can frame after its data
>    has been copied

That looks great now!

> @@ -344,8 +360,16 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
>   		 * relevant for updates that are generated by the
>   		 * BCM, where nframes is 1
>   		 */
> -		if (head->nframes == 1)
> +		if (head->nframes == 1) {
> +			pflags = bcm_flags(skb);
> +			*pflags = 0;

This initialization of the msg flags always has to be done.

I've sent a 'v3' patch that also simplifies the sock_skb_cb_check_size() 
usage:

https://lore.kernel.org/linux-can/20240120081018.2319-1-socketcan@hartkopp.net/

Please check if the changes fit for you.

I also created some user space testing code in my can-tests repo to 
prove the correct msg flags implementation:

https://github.com/hartkopp/can-tests/commit/67957def0b0035d79000f5baad93f8764ec11fc4

Works fine ;-)

Best regards,
Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ