From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
kernel-dev@igalia.com, kernel@gpiccoli.net, anton@enomsg.org,
ccross@android.com, tony.luck@intel.com,
linux-efi@vger.kernel.org
Subject: Re: [PATCH 8/8] efi: pstore: Add module parameter for setting the record size
Date: Fri, 7 Oct 2022 14:01:53 -0300 [thread overview]
Message-ID: <00780cd5-8c4b-dfe1-950d-393cbaaff3fb@igalia.com> (raw)
In-Reply-To: <CAMj1kXE6aObn7hGneGMMiJ-ss7YaiYDFL+HqktYt2WMUpZnFjQ@mail.gmail.com>
On 07/10/2022 12:06, Ard Biesheuvel wrote:
> [...]
> Well, I did spot this oddity
>
> efi_pstore_info.buf = kmalloc(4096, GFP_KERNEL);
> if (!efi_pstore_info.buf)
> return -ENOMEM;
>
> efi_pstore_info.bufsize = 1024;
>
> So that hardcoded 4096 looks odd, but at least it is larger than the
> default 1024. So what happens if you increase the record size to >
> 4096?
This is a very good finding, thanks a bunch Ard and apologies for this
mistake!
Before this patch it was "safe" doing this way since the allocation was
4096 whereas the size value was 1024. Now, with my change this is not
valid anymore, and my feeling is that it worked fine in my tests because
I'm testing panic (which is a single CPU/no-IRQ scenario), so basically
we're corrupting memory...but nothing broke in my tests due to panic
scenario.
Thanks again, I'll fix that - need to allocate record_size.
Guilherme
next prev parent reply other threads:[~2022-10-07 17:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 22:42 [PATCH 0/8] Some pstore improvements Guilherme G. Piccoli
2022-10-06 22:42 ` [PATCH 7/8] efi: pstore: Follow convention for the efi-pstore backend name Guilherme G. Piccoli
2022-10-06 23:16 ` Kees Cook
2022-10-07 8:47 ` Ard Biesheuvel
2022-10-14 17:41 ` (subset) " Kees Cook
2024-06-03 23:02 ` Stephen Boyd
2024-06-04 19:05 ` Guilherme G. Piccoli
2022-10-06 22:42 ` [PATCH 8/8] efi: pstore: Add module parameter for setting the record size Guilherme G. Piccoli
2022-10-06 23:16 ` Kees Cook
2022-10-07 9:11 ` Ard Biesheuvel
2022-10-07 13:00 ` Guilherme G. Piccoli
2022-10-07 13:19 ` Ard Biesheuvel
2022-10-07 13:45 ` Guilherme G. Piccoli
2022-10-07 15:06 ` Ard Biesheuvel
2022-10-07 17:01 ` Guilherme G. Piccoli [this message]
2022-10-07 19:32 ` Kees Cook
2022-10-07 23:29 ` Guilherme G. Piccoli
2022-10-08 2:36 ` Kees Cook
2022-10-06 23:24 ` [PATCH 0/8] Some pstore improvements Kees Cook
2022-10-12 15:50 ` Guilherme G. Piccoli
2022-10-12 17:59 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00780cd5-8c4b-dfe1-950d-393cbaaff3fb@igalia.com \
--to=gpiccoli@igalia.com \
--cc=anton@enomsg.org \
--cc=ardb@kernel.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=kernel-dev@igalia.com \
--cc=kernel@gpiccoli.net \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox