lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2F1CC5DE-5A03-46D2-95E7-DD07A4EF2766@live.com>
Date:   Thu, 10 Feb 2022 05:49:50 +0000
From:   Aditya Garg <gargaditya08@...e.com>
To:     Matthew Garrett <mjg59@...f.ucam.org>
CC:     Ard Biesheuvel <ardb@...nel.org>, Jeremy Kerr <jk@...abs.org>,
        "joeyli.kernel@...il.com" <joeyli.kernel@...il.com>,
        "zohar@...ux.ibm.com" <zohar@...ux.ibm.com>,
        "jmorris@...ei.org" <jmorris@...ei.org>,
        "eric.snowberg@...cle.com" <eric.snowberg@...cle.com>,
        "dhowells@...hat.com" <dhowells@...hat.com>,
        "jlee@...e.com" <jlee@...e.com>,
        "James.Bottomley@...senpartnership.com" 
        <James.Bottomley@...senPartnership.com>,
        "jarkko@...nel.org" <jarkko@...nel.org>,
        "mic@...ikod.net" <mic@...ikod.net>,
        "dmitry.kasatkin@...il.com" <dmitry.kasatkin@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
        "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "keyrings@...r.kernel.org" <keyrings@...r.kernel.org>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        Orlando Chamberlain <redecorating@...tonmail.com>,
        Aun-Ali Zaidi <admin@...eit.net>
Subject: Re: [PATCH] efi: Do not import certificates from UEFI Secure Boot for
 T2 Macs




> ie, can you try something like this?
> 
> diff --git a/drivers/firmware/efi/runtime-wrappers.c b/drivers/firmware/efi/runtime-wrappers.c
> index f3e54f6616f0..01cbd4811d1e 100644
> --- a/drivers/firmware/efi/runtime-wrappers.c
> +++ b/drivers/firmware/efi/runtime-wrappers.c
> @@ -32,6 +32,8 @@
> #include <linux/stringify.h>
> #include <linux/workqueue.h>
> #include <linux/completion.h>
> +#include <linux/ucs2_string.h>
> +#include <linux/slab.h>
> 
> #include <asm/efi.h>
> 
> @@ -203,6 +205,21 @@ static void efi_call_rts(struct work_struct *work)
> 				       (efi_time_t *)arg2);
> 		break;
> 	case EFI_GET_VARIABLE:
> +		unsigned long utf8_name_size;
> +		char *utf8_name;
> +		char guid_str[sizeof(efi_guid_t)+1];
> +
> +		utf8_name_size = ucs2_utf8size((efi_char16_t *)arg1);
> +		utf8_name = kmalloc(utf8_name_size+1, GFP_KERNEL);
> +		if (!utf8_name) {
> +			printk(KERN_INFO "failed to allocate UTF8 buffer\n");
> +			break;
> +		}
> +
> +		ucs2_as_utf8(utf8_name, (efi_char16_t *)arg1, utf8_name_size + 1);
> +		efi_guid_to_str((efi_guid_t *)arg2, guid_str);
> +
> +		printk(KERN_INFO "Reading EFI variable %s-%s\n", utf8_name, guid_str);
> 		status = efi_call_virt(get_variable, (efi_char16_t *)arg1,
> 				       (efi_guid_t *)arg2, (u32 *)arg3,
> 				       (unsigned long *)arg4, (void *)arg5);

Looks like there is some error in this patch


drivers/firmware/efi/runtime-wrappers.c:208:3: error: a label can only be part of a statement and a declaration is not a statement
  208 |   unsigned long utf8_name_size;
      |   ^~~~~~~~
drivers/firmware/efi/runtime-wrappers.c:209:3: error: expected expression before ‘char’
  209 |   char *utf8_name;
      |   ^~~~
drivers/firmware/efi/runtime-wrappers.c:210:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  210 |   char guid_str[sizeof(efi_guid_t)+1];
      |   ^~~~
drivers/firmware/efi/runtime-wrappers.c:213:3: error: ‘utf8_name’ undeclared (first use in this function)
  213 |   utf8_name = kmalloc(utf8_name_size+1, GFP_KERNEL);
      |   ^~~~~~~~~
drivers/firmware/efi/runtime-wrappers.c:213:3: note: each undeclared identifier is reported only once for each function it appears in
make[6]: *** [scripts/Makefile.build:287: drivers/firmware/efi/runtime-wrappers.o] Error 1
make[5]: *** [scripts/Makefile.build:549: drivers/firmware/efi] Error 2
make[4]: *** [scripts/Makefile.build:549: drivers/firmware] Error 2
make[4]: *** Waiting for unfinished jobs....

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ