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: <20210616094633.fwg6rsyxyvm2zc6d@pengutronix.de>
Date:   Wed, 16 Jun 2021 11:46:33 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Vincent Mailhol <mailhol.vincent@...adoo.fr>
Cc:     linux-can@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Oliver Hartkopp <socketcan@...tkopp.net>
Subject: Re: [PATCH v2 2/2] can: netlink: add interface for CAN-FD
 Transmitter Delay Compensation (TDC)

On 04.06.2021 00:15:50, Vincent Mailhol wrote:
[...]

> +static size_t can_tdc_get_size(const struct net_device *dev)
> +{
> +	struct can_priv *priv = netdev_priv(dev);
> +	size_t size;
> +
> +	if (!priv->tdc_const)
> +		return 0;
> +
> +	size = nla_total_size(0);			/* nest IFLA_CAN_TDC */
> +	size += nla_total_size(sizeof(u32));		/* IFLA_CAN_TDCV_MAX */
> +	size += nla_total_size(sizeof(u32));		/* IFLA_CAN_TDCO_MAX */
> +	size += nla_total_size(sizeof(u32));		/* IFLA_CAN_TDCF_MAX */
> +
> +	if (priv->tdc.tdco) {

Naively I'd say, iff the device has tdc_const give the user space the
tdc parameters, regardless if some value is 0 or not.

What do you think?

Marc
-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ