From: Aditya Garg <gargaditya08@live.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "matthew.garrett@nebula.com" <matthew.garrett@nebula.com>,
"jk@ozlabs.org" <jk@ozlabs.org>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Orlando Chamberlain <redecorating@protonmail.com>
Subject: Re: [REGRESSION] Failure to write the NVRAM variables starting from kernel 6.0 on T2 Macs
Date: Thu, 20 Oct 2022 10:54:05 +0000 [thread overview]
Message-ID: <E59CCD93-C6F2-4A78-89F7-9F2244C9AB97@live.com> (raw)
In-Reply-To: <CAMj1kXG03-0AdM_ROf2UhH-N2Z52v7ox_emSQw=y5p3sMeTrMA@mail.gmail.com>
Hi Ard
> On 20-Oct-2022, at 2:53 AM, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> Hello Aditya
>
> Thanks for the report. I did identify an issue in some refactoring
> work of the efivars layer that went into 6.0
>
> Can you please check whether the change below fixes the issue for you?
The patch given below fixes the issue for me.
>
> diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c
> index dd74d2ad3184..35edba93cf14 100644
> --- a/drivers/firmware/efi/vars.c
> +++ b/drivers/firmware/efi/vars.c
> @@ -209,7 +209,7 @@ efivar_set_variable_blocking(efi_char16_t *name,
> efi_guid_t *vendor,
> if (data_size > 0) {
> status = check_var_size(attr, data_size +
> ucs2_strsize(name, 1024));
> - if (status != EFI_SUCCESS)
> + if (status != EFI_SUCCESS && status != EFI_UNSUPPORTED)
> return status;
> }
> return __efivars->ops->set_variable(name, vendor, attr,
> data_size, data);
> @@ -242,7 +242,7 @@ efi_status_t
> efivar_set_variable_locked(efi_char16_t *name, efi_guid_t *vendor,
> if (data_size > 0) {
> status = check_var_size_nonblocking(attr, data_size +
>
> ucs2_strsize(name, 1024));
> - if (status != EFI_SUCCESS)
> + if (status != EFI_SUCCESS && status != EFI_UNSUPPORTED)
> return status;
> }
> return setvar(name, vendor, attr, data_size, data);
Thanks
Aditya
next prev parent reply other threads:[~2022-10-20 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 19:26 Aditya Garg
2022-10-19 21:23 ` Ard Biesheuvel
2022-10-20 10:54 ` Aditya Garg [this message]
2022-10-26 21:18 ` Aditya Garg
2022-10-26 21:20 ` Ard Biesheuvel
2022-10-27 4:33 ` Aditya Garg
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=E59CCD93-C6F2-4A78-89F7-9F2244C9AB97@live.com \
--to=gargaditya08@live.com \
--cc=ardb@kernel.org \
--cc=jk@ozlabs.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=redecorating@protonmail.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
all inboxes | Powered by JetHome®