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: <59083303fc79497b2658ff15ac3c18b985e270ab.camel@redhat.com>
Date:   Thu, 16 Nov 2023 10:46:30 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     Shigeru Yoshida <syoshida@...hat.com>, jmaloy@...hat.com,
        ying.xue@...driver.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org
Cc:     netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] tipc: Remove redundant call to TLV_SPACE()

Hi,

On Tue, 2023-11-14 at 23:43 +0900, Shigeru Yoshida wrote:
> The purpose of TLV_SPACE() is to add the TLV descriptor size to the size of
> the TLV value passed as argument and align the resulting size to
> TLV_ALIGNTO.
> 
> tipc_tlv_alloc() calls TLV_SPACE() on its argument. In other words,
> tipc_tlv_alloc() takes its argument as the size of the TLV value. So the
> call to TLV_SPACE() in tipc_get_err_tlv() is redundant. Let's remove this
> redundancy.
> 
> Fixes: d0796d1ef63d ("tipc: convert legacy nl bearer dump to nl compat")
> Signed-off-by: Shigeru Yoshida <syoshida@...hat.com>

The patch LGTM, but I think this is more a cleanup then a fix, please
re-submit it for net-next, dropping the Fixes tag (so it will not land
in stable tree).

With the above you can add:

Acked-by: Paolo Abeni <pabeni@...hat.com>
> ---
>  net/tipc/netlink_compat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
> index 5bc076f2fa74..db0365c9b8bd 100644
> --- a/net/tipc/netlink_compat.c
> +++ b/net/tipc/netlink_compat.c
> @@ -167,7 +167,7 @@ static struct sk_buff *tipc_get_err_tlv(char *str)
>  	int str_len = strlen(str) + 1;
>  	struct sk_buff *buf;
>  
> -	buf = tipc_tlv_alloc(TLV_SPACE(str_len));
> +	buf = tipc_tlv_alloc(str_len);
>  	if (buf)
>  		tipc_add_tlv(buf, TIPC_TLV_ERROR_STRING, str, str_len);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ