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]
Date:   Wed, 7 Jul 2021 11:41:50 +0200
From:   Oleksij Rempel <o.rempel@...gutronix.de>
To:     David Jander <david@...tonic.nl>
Cc:     dev.kurt@...dijck-laurijssen.be, mkl@...gutronix.de,
        wg@...ndegger.com, kernel@...gutronix.de,
        linux-can@...r.kernel.org, netdev@...r.kernel.org,
        Zhang Changzhong <zhangchangzhong@...wei.com>
Subject: Re: [PATCH v1 2/2] net: j1939: extend UAPI to notify about RX status

On Tue, Jul 06, 2021 at 03:28:34PM +0200, David Jander wrote:
> On Tue,  6 Jul 2021 13:57:58 +0200
> Oleksij Rempel <o.rempel@...gutronix.de> wrote:
> 
> > -static size_t j1939_sk_opt_stats_get_size(void)
> > +static size_t j1939_sk_opt_stats_get_size(enum j1939_sk_errqueue_type type)
> >  {
> > -	return
> > -		nla_total_size(sizeof(u32)) + /* J1939_NLA_BYTES_ACKED */
> > -		0;
> > +	switch (type) {
> > +	case J1939_ERRQUEUE_RX_RTS:
> > +		return
> > +			nla_total_size(sizeof(u32)) + /* J1939_NLA_BYTES_ALL */
> > +			nla_total_size(sizeof(u64)) + /* J1939_NLA_DEST_ADDR */
> > +			nla_total_size(sizeof(u64)) + /* J1939_NLA_SRC_ADDR */
> 
> DST and SRC address are u8...?

done

> > +			nla_total_size(sizeof(u64)) + /* J1939_NLA_DEST_NAME */
> > +			nla_total_size(sizeof(u64)) + /* J1939_NLA_SRC_NAME */
> > +		nla_put_u8(stats, J1939_NLA_SRC_ADDR,
> > +			   session->skcb.addr.sa);
> > +		nla_put_u8(stats, J1939_NLA_DEST_ADDR,
> > +			   session->skcb.addr.da);
> 
> See above.
> Also, shouldn't the order of these be the same as in
> j1939_sk_opt_stats_get_size()... for readability?

ack, done

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ