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: <5D48DC13.1020802@hisilicon.com>
Date:   Tue, 6 Aug 2019 09:46:59 +0800
From:   Zhou Wang <wangzhou1@...ilicon.com>
To:     <robert.jarzmik@...e.fr>, <axboe@...com>, <axboe@...nel.dk>,
        <gregkh@...uxfoundation.org>
CC:     <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>
Subject: Re: [PATCH resend v2] lib: scatterlist: Fix to support no mapped sg

On 2019/7/29 9:44, Zhou Wang wrote:
> On 2019/7/24 11:54, Zhou Wang wrote:
>> In function sg_split, the second sg_calculate_split will return -EINVAL
>> when in_mapped_nents is 0.
>>
>> Indeed there is no need to do second sg_calculate_split and sg_split_mapped
>> when in_mapped_nents is 0, as in_mapped_nents indicates no mapped entry in
>> original sgl.
>>
>> Signed-off-by: Zhou Wang <wangzhou1@...ilicon.com>
>> Acked-by: Robert Jarzmik <robert.jarzmik@...e.fr>
>> ---
>> v2: Just add Acked-by from Robert.
>>
>>  lib/sg_split.c | 12 +++++++-----
>>  1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/sg_split.c b/lib/sg_split.c
>> index 9982c63..60a0bab 100644
>> --- a/lib/sg_split.c
>> +++ b/lib/sg_split.c
>> @@ -176,11 +176,13 @@ int sg_split(struct scatterlist *in, const int in_mapped_nents,
>>  	 * The order of these 3 calls is important and should be kept.
>>  	 */
>>  	sg_split_phys(splitters, nb_splits);
>> -	ret = sg_calculate_split(in, in_mapped_nents, nb_splits, skip,
>> -				 split_sizes, splitters, true);
>> -	if (ret < 0)
>> -		goto err;
>> -	sg_split_mapped(splitters, nb_splits);
>> +	if (in_mapped_nents) {
>> +		ret = sg_calculate_split(in, in_mapped_nents, nb_splits, skip,
>> +					 split_sizes, splitters, true);
>> +		if (ret < 0)
>> +			goto err;
>> +		sg_split_mapped(splitters, nb_splits);
>> +	}
>>  
>>  	for (i = 0; i < nb_splits; i++) {
>>  		out[i] = splitters[i].out_sg;
>>
> 
> Hi Jens,
> 
> I saw you are the committer of sg_splite.c, could you help to take this patch?
> 
> Many thanks,
> Zhou
>

Anyone can help to take this fix?

Best,
Zhou

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ