[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230708021807.GB1731@sol.localdomain>
Date: Fri, 7 Jul 2023 19:18:07 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: linux-hardening@...r.kernel.org, Kees Cook <keescook@...omium.org>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>
Subject: Re: [PATCH v2 1/2] pstore: Remove worst-case compression size logic
On Fri, Jul 07, 2023 at 10:34:55AM +0200, Ard Biesheuvel wrote:
> From: Kees Cook <keescook@...omium.org>
As was mentioned by others, you should reset the author.
> + /* Worst-case compression should never be more than uncompressed. */
> + buf = kmalloc(psinfo->bufsize, GFP_KERNEL);
I don't think the above comment really conveys the reasoning. Maybe write
something along the lines of:
/*
* The compression buffer only needs to be as large as the maximum
* uncompressed record size, since any record that would be expanded by
* compression is just stored uncompressed.
*/
- Eric
Powered by blists - more mailing lists