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:   Mon, 13 Jan 2020 11:03:29 +0100
From:   Zaslonko Mikhail <zaslonko@...ux.ibm.com>
To:     dsterba@...e.cz, Josef Bacik <josef@...icpanda.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Chris Mason <clm@...com>, David Sterba <dsterba@...e.com>,
        Richard Purdie <rpurdie@...ys.net>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Eduard Shishkin <edward6@...ux.ibm.com>,
        Ilya Leoshkevich <iii@...ux.ibm.com>,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] btrfs: Use larger zlib buffer for s390 hardware
 compression

Hello David,

On 09.01.2020 02:10, David Sterba wrote:
> On Wed, Jan 08, 2020 at 07:48:31PM +0100, Zaslonko Mikhail wrote:
>>>> +        } else if (workspace->strm.avail_out == 0) {
>>>> +            /* get another page for the stream end */
>>>> +            kunmap(out_page);
>>>> +            if (nr_pages == nr_dest_pages) {
>>>> +                out_page = NULL;
>>>> +                ret = -E2BIG;
>>>> +                goto out;
>>>> +            }
>>>> +            out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM);
>>>> +            if (out_page == NULL) {
>>>> +                ret = -ENOMEM;
>>>> +                goto out;
>>>> +            }
>>>
>>> Do we need zlib_deflateEnd() for the above error cases?  Thanks,
>>
>> The original btrfs code did not call zlib_deflateEnd() for -E2BIG and 
>> -ENOMEM cases, so I stick to the same logic.
>> Unlike userspace zlib where deflateEnd() frees all dynamically allocated 
>> memory, in the kernel it doesn't do much apart from setting the return 
>> code (since all the memory allocations for kernel zlib are performed in advance).
> 
> Agreed, deflateEnd is not necessary in the error cases.

Can I consider this as 'Acked-by' from your side?
Are there any unanswered questions left on this patch?

> 

Thanks,
Mikhail

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ