public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add missing attributes to EFI variable attribute print out from sysfs
@ 2012-07-13 15:38 Khalid Aziz
  2012-07-13 15:44 ` Kees Cook
  2012-07-13 15:46 ` Matthew Garrett
  0 siblings, 2 replies; 8+ messages in thread
From: Khalid Aziz @ 2012-07-13 15:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: tony.luck, mikew, mjg, keescook, gong.chen

Some of the EFI variable attributes are missing from print out from
/sys/firmware/efi/vars/*/attributes. This patch adds those in.

Signed-off-by: Khalid Aziz <khalid.aziz@hp.com>
Cc: stable@vger.kernel.org
---
 drivers/firmware/efivars.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 47408e8..1e1ac75 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -441,6 +441,16 @@ efivar_attr_read(struct efivar_entry *entry, char *buf)
 		str += sprintf(str, "EFI_VARIABLE_BOOTSERVICE_ACCESS\n");
 	if (var->Attributes & 0x4)
 		str += sprintf(str, "EFI_VARIABLE_RUNTIME_ACCESS\n");
+	if (var->Attributes & 0x8)
+		str += sprintf(str, "EFI_VARIABLE_HARDWARE_ERROR_RECORD\n");
+	if (var->Attributes & 0x10)
+		str += sprintf(str,
+			"EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\n");
+	if (var->Attributes & 0x20)
+		str += sprintf(str,
+			"EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS\n");
+	if (var->Attributes & 0x40)
+		str += sprintf(str, "EFI_VARIABLE_APPEND_WRITE\n");
 	return str - buf;
 }
 
-- 
1.7.9.5

==================
Khalid Aziz
khalid.aziz@hp.com

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-13 19:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-13 15:38 [PATCH] Add missing attributes to EFI variable attribute print out from sysfs Khalid Aziz
2012-07-13 15:44 ` Kees Cook
2012-07-13 15:46 ` Matthew Garrett
2012-07-13 15:54   ` Khalid Aziz
2012-07-13 17:52   ` Khalid Aziz
2012-07-13 17:54     ` Matthew Garrett
2012-07-13 18:05       ` Khalid Aziz
     [not found]     ` <CAGTjWtA0LmQ-90zjYf0nho_LEra8nx32M1R7E6o=3S68UjfEHw@mail.gmail.com>
2012-07-13 19:10       ` Khalid Aziz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox