From: Kees Cook <keescook@chromium.org>
To: Geliang Tang <geliangtang@gmail.com>
Cc: Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
Matt Fleming <matt@codeblueprint.co.uk>,
linux-acpi@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>
Subject: Re: [PATCH] pstore: set ecc_notice_size to zero
Date: Thu, 2 Jun 2016 09:03:02 -0700 [thread overview]
Message-ID: <CAGXu5jJeLbe5D-wLPDR6z9y=DTz57gr56G6M2vZz9MXqRRerdQ@mail.gmail.com> (raw)
In-Reply-To: <ca5ede6ead67d9f805748394c37f06e174543bd3.1464844327.git.geliangtang@gmail.com>
On Wed, Jun 1, 2016 at 10:17 PM, Geliang Tang <geliangtang@gmail.com> wrote:
> Since a @ecc_notice_size parameter has been added in pstore_info.read(),
> this patch sets this parameter to zero in efi_pstore_read() and
> erst_reader().
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Thanks! I'll get this added.
-Kees
> ---
> drivers/acpi/apei/erst.c | 1 +
> drivers/firmware/efi/efi-pstore.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
> index 3024edf..f096ab3 100644
> --- a/drivers/acpi/apei/erst.c
> +++ b/drivers/acpi/apei/erst.c
> @@ -1035,6 +1035,7 @@ skip:
> memcpy(*buf, rcd->data, len - sizeof(*rcd));
> *id = record_id;
> *compressed = false;
> + *ecc_notice_size = 0;
> if (uuid_le_cmp(rcd->sec_hdr.section_type,
> CPER_SECTION_TYPE_DMESG_Z) == 0) {
> *type = PSTORE_TYPE_DMESG;
> diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
> index cd8c35f..d5903ea 100644
> --- a/drivers/firmware/efi/efi-pstore.c
> +++ b/drivers/firmware/efi/efi-pstore.c
> @@ -34,6 +34,7 @@ struct pstore_read_data {
> int *count;
> struct timespec *timespec;
> bool *compressed;
> + ssize_t *ecc_notice_size;
> char **buf;
> };
>
> @@ -69,6 +70,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
> *cb_data->compressed = true;
> else
> *cb_data->compressed = false;
> + *cb_data->ecc_notice_size = 0;
> } else if (sscanf(name, "dump-type%u-%u-%d-%lu",
> cb_data->type, &part, &cnt, &time) == 4) {
> *cb_data->id = generic_id(time, part, cnt);
> @@ -76,6 +78,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
> cb_data->timespec->tv_sec = time;
> cb_data->timespec->tv_nsec = 0;
> *cb_data->compressed = false;
> + *cb_data->ecc_notice_size = 0;
> } else if (sscanf(name, "dump-type%u-%u-%lu",
> cb_data->type, &part, &time) == 3) {
> /*
> @@ -88,6 +91,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
> cb_data->timespec->tv_sec = time;
> cb_data->timespec->tv_nsec = 0;
> *cb_data->compressed = false;
> + *cb_data->ecc_notice_size = 0;
> } else
> return 0;
>
> @@ -221,6 +225,7 @@ static ssize_t efi_pstore_read(u64 *id, enum pstore_type_id *type,
> data.count = count;
> data.timespec = timespec;
> data.compressed = compressed;
> + data.ecc_notice_size = ecc_notice_size;
> data.buf = buf;
>
> *data.buf = kzalloc(EFIVARS_DATA_SIZE_MAX, GFP_KERNEL);
> --
> 1.9.1
>
--
Kees Cook
Chrome OS & Brillo Security
prev parent reply other threads:[~2016-06-02 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 5:17 [PATCH] pstore: set ecc_notice_size to zero Geliang Tang
2016-06-02 16:03 ` Kees Cook [this message]
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='CAGXu5jJeLbe5D-wLPDR6z9y=DTz57gr56G6M2vZz9MXqRRerdQ@mail.gmail.com' \
--to=keescook@chromium.org \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=geliangtang@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=rjw@rjwysocki.net \
--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;
as well as URLs for NNTP newsgroup(s).