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]
Date:	Mon, 10 Sep 2012 13:55:49 -0400
From:	Mike Waychison <mikew@...gle.com>
To:	Khalid Aziz <khalid.aziz@...com>,
	Greg Kroah-Hartman <gregkh@...e.de>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Tony Luck <tony.luck@...el.com>,
	Matthew Garrett <mjg@...hat.com>,
	Kees Cook <keescook@...omium.org>,
	"gong.chen@...ux.intel.com" <gong.chen@...ux.intel.com>
Subject: Re: [PATCH v2] Add missing attributes to EFI variable attribute print
 out from sysfs

Greg,

Can you please pick this patch up in one of your trees?

Thanks!

Mike Waychison

On Fri, Jul 13, 2012 at 1:42 PM, Khalid Aziz <khalid.aziz@...com> wrote:
> Some of the EFI variable attributes are missing from print out from
> /sys/firmware/efi/vars/*/attributes. This patch adds those in. It also
> updates code to use pre-defined constants for masking current value
> of attributes.
>
> Signed-off-by: Khalid Aziz <khalid.aziz@...com>
> Cc: stable@...r.kernel.org
> ---
>  drivers/firmware/efivars.c |   17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
> index 47408e8..d10c987 100644
> --- a/drivers/firmware/efivars.c
> +++ b/drivers/firmware/efivars.c
> @@ -435,12 +435,23 @@ efivar_attr_read(struct efivar_entry *entry, char *buf)
>         if (status != EFI_SUCCESS)
>                 return -EIO;
>
> -       if (var->Attributes & 0x1)
> +       if (var->Attributes & EFI_VARIABLE_NON_VOLATILE)
>                 str += sprintf(str, "EFI_VARIABLE_NON_VOLATILE\n");
> -       if (var->Attributes & 0x2)
> +       if (var->Attributes & EFI_VARIABLE_BOOTSERVICE_ACCESS)
>                 str += sprintf(str, "EFI_VARIABLE_BOOTSERVICE_ACCESS\n");
> -       if (var->Attributes & 0x4)
> +       if (var->Attributes & EFI_VARIABLE_RUNTIME_ACCESS)
>                 str += sprintf(str, "EFI_VARIABLE_RUNTIME_ACCESS\n");
> +       if (var->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD)
> +               str += sprintf(str, "EFI_VARIABLE_HARDWARE_ERROR_RECORD\n");
> +       if (var->Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)
> +               str += sprintf(str,
> +                       "EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\n");
> +       if (var->Attributes &
> +                       EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)
> +               str += sprintf(str,
> +                       "EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS\n");
> +       if (var->Attributes & EFI_VARIABLE_APPEND_WRITE)
> +               str += sprintf(str, "EFI_VARIABLE_APPEND_WRITE\n");
>         return str - buf;
>  }
>
> --
> 1.7.9.5
>
> --
> Khalid Aziz
> khalid.aziz@...com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists