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: <36189f0d-82ec-36f8-c093-1947ebbe3160@linux.ibm.com>
Date:   Thu, 9 Feb 2023 13:57:04 +0100
From:   Alexandra Winter <wintera@...ux.ibm.com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-s390@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
        Thorsten Winkler <twinkler@...ux.ibm.com>,
        Jules Irenge <jbi.octave@...il.com>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH net-next v2 3/4] s390/qeth: Convert sysfs sprintf to
 sysfs_emit



On 09.02.23 12:27, Simon Horman wrote:
> On Thu, Feb 09, 2023 at 12:04:23PM +0100, Alexandra Winter wrote:
>> From: Thorsten Winkler <twinkler@...ux.ibm.com>
...
>>  
>> -		entry_len = qeth_l3_ipaddr_to_string(proto, ipatoe->addr,
>> -						     addr_str);
>> -		if (entry_len < 0)
>> -			continue;
> 
> Here the return code of qeth_l3_ipaddr_to_string() is checked for an error.
> 
>> -
>> -		/* Append /%mask to the entry: */
>> -		entry_len += 1 + ((proto == QETH_PROT_IPV4) ? 2 : 3);
>> -		/* Enough room to format %entry\n into null terminated page? */
>> -		if (entry_len + 1 > PAGE_SIZE - str_len - 1)
>> -			break;
>> -
>> -		entry_len = scnprintf(buf, PAGE_SIZE - str_len,
>> -				      "%s/%i\n", addr_str, ipatoe->mask_bits);
>> -		str_len += entry_len;
>> -		buf += entry_len;
>> +		qeth_l3_ipaddr_to_string(proto, ipatoe->addr, addr_str);
> 
> But here it is not. Is that ok?
> 
> Likewise in qeth_l3_dev_ip_add_show().

As you pointed out in your comments to patch 4/4 v1, qeth_l3_ipaddr_to_string()
will never return a negative value, as it only returns the result of s*printf()
which at least in this usecase here will never return < 0.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ