Add missing attributes to EFI variable attribute print out from sysfs
PATCH v2 1/1 Add missing attributes to EFI variable attribute print out from sysfs
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.
--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/firmware/efivars.c +14 -3
@@ -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; }
Signature · 5 lines
1.7.9.5 -- Khalid Aziz [email protected]
Quoted 7 lines · Khalid Aziz
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 <[email protected]>
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 9 lines · Matthew Garrett
Quoted 7 lines · Khalid Aziz
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 <[email protected]>Acked-by Matthew Garrett <[email protected]>
I have not seen this patch show up in linux-next or 3.6-rc*. Do I need to do anything more to get this patch integrated?
Thanks
Signature · 1 line
Khalid Aziz <[email protected]>
Greg,
Can you please pick this patch up in one of your trees?
Thanks!
Mike Waychison
Quoted 48 lines · Khalid Aziz
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 <[email protected]>--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)drivers/firmware/efivars.c +14
-4@@ -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
[email protected]
Quoted 3 lines · Mike Waychison
Greg,
Can you please pick this patch up in one of your trees?
Resend using a good email addy for gregkh :)
Quoted 54 lines
Thanks!
Mike Waychison
Quoted 48 lines · Khalid Aziz
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 <[email protected]>--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)drivers/firmware/efivars.c +14
-4@@ -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
[email protected]
Quoted 6 lines · Mike Waychison
Quoted 3 lines · Mike Waychison
Greg,
Can you please pick this patch up in one of your trees?
Resend using a good email addy for gregkh :)
Can someone resend it in a format that I can apply it in? I can't find the original anymore, sorry.
greg k-h
Quoted 4 lines · Greg KH
Quoted 3 lines · Mike Waychison
Quoted 2 lines · Mike Waychison
Greg,
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Can you please pick this patch up in one of your trees?
Resend using a good email addy for gregkh :)
Can someone resend it in a format that I can apply it in? I can't find the original anymore, sorry.
greg k-h
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.
drivers/firmware/efivars.c +14 -3
@@ -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
Signature · 1 line
Khalid Aziz <[email protected]>
drivers/firmware/efivars.c
Quoted 22 lines · Khalid Aziz
Quoted 4 lines · Greg KH
Quoted 3 lines · Mike Waychison
Quoted 2 lines · Mike Waychison
Greg,
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Can you please pick this patch up in one of your trees?
Resend using a good email addy for gregkh :)
Can someone resend it in a format that I can apply it in? I can't find the original anymore, sorry.
greg k-h
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 <[email protected]>drivers/firmware/efivars.c +0
-0
This isn't in a format I can apply it in, without having to edit the heck out of the email by hand :(
Care to try it again, adding the different acks it picked up along the review way, and send it, again as I asked for, in a format I can apply it in?
greg k-h
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.
--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/firmware/efivars.c +14 -3
@@ -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
drivers/firmware/efivars.c
Quoted 14 lines · Khalid Aziz
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 <[email protected]>Reviewed-by Kees Cook <[email protected]>Acked-by Matthew Garrett <[email protected]>--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)drivers/firmware/efivars.c +0
-0
Ah, so close...
What's with the "Re:" in the Subject"?
And what happened to the extra line that should be after the diffstat and before the "diff --" line?
Third time's a charm?
greg k-h
PATCH RESEND v2 1/1 Add missing attributes to EFI variable attribute print out from sysfs
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.
--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/firmware/efivars.c +14 -3
@@ -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
Quoted 18 lines · Greg KH
drivers/firmware/efivars.c
Quoted 14 lines · Khalid Aziz
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 <[email protected]>Reviewed-by Kees Cook <[email protected]>Acked-by Matthew Garrett <[email protected]>--- drivers/firmware/efivars.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)drivers/firmware/efivars.c +0
-0Ah, so close...
Quoted 6 lines
What's with the "Re:" in the Subject"?
And what happened to the extra line that should be after the diffstat and before the "diff --" line?
Third time's a charm?
Sorry, Greg. I screwed up. I need to pay closer attention. Hopefully the one I just sent out does the job.
Signature · 1 line
Khalid Aziz <[email protected]>