[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jKdO8icx63YDkqDsYP4_pNxRe5zUiVUg2+0mhbHj10zTg@mail.gmail.com>
Date: Wed, 14 Nov 2018 01:56:09 -0600
From: Kees Cook <keescook@...omium.org>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH 2/8] pstore: Do not use crash buffer for decompression
On Fri, Nov 2, 2018 at 1:24 PM, Joel Fernandes <joel@...lfernandes.org> wrote:
> On Thu, Nov 01, 2018 at 04:51:54PM -0700, Kees Cook wrote:
>> static void decompress_record(struct pstore_record *record)
>> {
>> + int ret;
>> int unzipped_len;
>
> nit: We could get rid of the unzipped_len variable now I think.
I didn't follow this -- it gets used quite a bit. I don't see a clean
way to remove it?
>> + workspace = kmalloc(unzipped_len + record->ecc_notice_size,
>
> Should tihs be unzipped_len + record->ecc_notice_size + 1. The extra byte
> being for the NULL character of the ecc notice?
>
> This occurred to me when I saw the + 1 in ram.c. It could be better to just
> abstract the size as a macro.
Ooh, yes, good catch. I'll get this fixed.
Thanks for the review!
--
Kees Cook
Powered by blists - more mailing lists