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:   Wed, 14 Oct 2020 16:33:48 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Henrik Bjoernlund <henrik.bjoernlund@...rochip.com>
Cc:     <davem@...emloft.net>, <roopa@...dia.com>, <nikolay@...dia.com>,
        <jiri@...lanox.com>, <idosch@...lanox.com>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <bridge@...ts.linux-foundation.org>,
        <UNGLinuxDriver@...rochip.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>
Subject: Re: [PATCH net-next v5 08/10] bridge: cfm: Netlink GET
 configuration Interface.

On Mon, 12 Oct 2020 14:04:26 +0000 Henrik Bjoernlund wrote:
> +		if (nla_put_u32(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
> +				mep->cc_ccm_tx_info.seq_no_update))
> +			goto nla_put_failure;
> +
> +		if (nla_put_u32(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
> +				mep->cc_ccm_tx_info.period))
> +			goto nla_put_failure;
> +
> +		if (nla_put_u32(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
> +				mep->cc_ccm_tx_info.if_tlv))
> +			goto nla_put_failure;
> +
> +		if (nla_put_u8(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
> +			       mep->cc_ccm_tx_info.if_tlv_value))
> +			goto nla_put_failure;
> +
> +		if (nla_put_u32(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
> +				mep->cc_ccm_tx_info.port_tlv))
> +			goto nla_put_failure;
> +
> +		if (nla_put_u8(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
> +			       mep->cc_ccm_tx_info.port_tlv_value))
> +			goto nla_put_failure;

Consider collapsing writing related attrs in a nest into a single
if statement:

	if (nla_put_u32(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
			mep->cc_ccm_tx_info.seq_no_update) ||
	    nla_put_u32(skb, IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
			mep->cc_ccm_tx_info.period) ||
		...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ