Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-18 Thread Matt Fleming
On 03/11/2013 01:17 PM, joeyli wrote: > Sorry for after I wrote patch, I think it's better we still use your > original patch to fix this bug, because I found the > efi_variable->VariableName allocated 1024 size and it also used by old > vars system. > > The following is my patch for reference,

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-18 Thread Matt Fleming
On 03/11/2013 01:17 PM, joeyli wrote: Sorry for after I wrote patch, I think it's better we still use your original patch to fix this bug, because I found the efi_variable-VariableName allocated 1024 size and it also used by old vars system. The following is my patch for reference, but I

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-11 Thread joeyli
Hi Matt, 於 四,2013-03-07 於 13:57 +,Matt Fleming 提到: > On Thu, 2013-03-07 at 11:39 +, Matt Fleming wrote: > > On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: > > > The VariableNameSize is not reliable when EFI_SUCCESS is returned > > > because UEFI 2.3.1 spec only mention VariableNameSize

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-11 Thread joeyli
Hi Matt, 於 四,2013-03-07 於 13:57 +,Matt Fleming 提到: On Thu, 2013-03-07 at 11:39 +, Matt Fleming wrote: On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: The VariableNameSize is not reliable when EFI_SUCCESS is returned because UEFI 2.3.1 spec only mention VariableNameSize should

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
於 四,2013-03-07 於 11:39 +,Matt Fleming 提到: > > This patch works on a normal UEFI machine, we will test it on HP > z220. I > > will send out it formally after test success. > > Has anyone tried contacting HP to tell them their firmware is doing > bizarre things? We will try to contact with HP

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
Hi Matt, 於 四,2013-03-07 於 13:57 +,Matt Fleming 提到: > On Thu, 2013-03-07 at 11:39 +, Matt Fleming wrote: > > On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: > > > The VariableNameSize is not reliable when EFI_SUCCESS is returned > > > because UEFI 2.3.1 spec only mention VariableNameSize

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread Matt Fleming
On Thu, 2013-03-07 at 11:39 +, Matt Fleming wrote: > On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: > > The VariableNameSize is not reliable when EFI_SUCCESS is returned > > because UEFI 2.3.1 spec only mention VariableNameSize should updated > > when EFI_BUFFER_TOO_SMALL is returned. And,

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread Matt Fleming
On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: > The VariableNameSize is not reliable when EFI_SUCCESS is returned > because UEFI 2.3.1 spec only mention VariableNameSize should updated > when EFI_BUFFER_TOO_SMALL is returned. And, the 1024 bytes of buffer is > from old UEFI spec. There doesn't

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
於 三,2013-03-06 於 11:19 +,Matt Fleming 提到: > On Wed, 2013-03-06 at 15:34 +0800, joeyli wrote: ... > > +static unsigned long variable_name_length(efi_char16_t *variable_name) > > +{ > > + unsigned long len; > > + efi_char16_t c; > > + > > + len = 2; > > + do { > > + c =

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
於 三,2013-03-06 於 17:20 +0800,Lingzhu Xiang 提到: > On 03/06/2013 03:34 PM, joeyli wrote: > > +static unsigned long variable_name_length(efi_char16_t *variable_name) > > +{ > > + unsigned long len; > > + efi_char16_t c; > > + > > + len = 2; > > + do { > > + c = variable_name[len /

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
於 四,2013-03-07 於 11:39 +,Matt Fleming 提到: This patch works on a normal UEFI machine, we will test it on HP z220. I will send out it formally after test success. Has anyone tried contacting HP to tell them their firmware is doing bizarre things? We will try to contact with HP

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
於 三,2013-03-06 於 17:20 +0800,Lingzhu Xiang 提到: On 03/06/2013 03:34 PM, joeyli wrote: +static unsigned long variable_name_length(efi_char16_t *variable_name) +{ + unsigned long len; + efi_char16_t c; + + len = 2; + do { + c = variable_name[len / sizeof(c) - 1];

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
於 三,2013-03-06 於 11:19 +,Matt Fleming 提到: On Wed, 2013-03-06 at 15:34 +0800, joeyli wrote: ... +static unsigned long variable_name_length(efi_char16_t *variable_name) +{ + unsigned long len; + efi_char16_t c; + + len = 2; + do { + c = variable_name[len /

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread Matt Fleming
On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: The VariableNameSize is not reliable when EFI_SUCCESS is returned because UEFI 2.3.1 spec only mention VariableNameSize should updated when EFI_BUFFER_TOO_SMALL is returned. And, the 1024 bytes of buffer is from old UEFI spec. There doesn't have

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread Matt Fleming
On Thu, 2013-03-07 at 11:39 +, Matt Fleming wrote: On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: The VariableNameSize is not reliable when EFI_SUCCESS is returned because UEFI 2.3.1 spec only mention VariableNameSize should updated when EFI_BUFFER_TOO_SMALL is returned. And, the 1024

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-07 Thread joeyli
Hi Matt, 於 四,2013-03-07 於 13:57 +,Matt Fleming 提到: On Thu, 2013-03-07 at 11:39 +, Matt Fleming wrote: On Thu, 2013-03-07 at 18:34 +0800, joeyli wrote: The VariableNameSize is not reliable when EFI_SUCCESS is returned because UEFI 2.3.1 spec only mention VariableNameSize should

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 14:30 +0100, Frederic Crozat wrote: > Le mercredi 06 mars 2013 à 12:36 +, Matt Fleming a écrit : > > On Wed, 2013-03-06 at 12:58 +0100, Frederic Crozat wrote: > > > Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : > > > > > > > Also, which machine did you

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Frederic Crozat
Le mercredi 06 mars 2013 à 12:36 +, Matt Fleming a écrit : > On Wed, 2013-03-06 at 12:58 +0100, Frederic Crozat wrote: > > Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : > > > > > Also, which machine did you see this behaviour on? > > > > HP z220 desktop, System BIOS K51 v

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 12:58 +0100, Frederic Crozat wrote: > Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : > > > Also, which machine did you see this behaviour on? > > HP z220 desktop, System BIOS K51 v 1.54 > > this issue is only the "Secure Boot" related variables, which make

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Frederic Crozat
Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : > Also, which machine did you see this behaviour on? HP z220 desktop, System BIOS K51 v 1.54 this issue is only the "Secure Boot" related variables, which make me think HP incorrectly created them in their latest firmware (where

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 17:20 +0800, Lingzhu Xiang wrote: > On 03/06/2013 03:34 PM, joeyli wrote: > > +static unsigned long variable_name_length(efi_char16_t *variable_name) > > +{ > > + unsigned long len; > > + efi_char16_t c; > > + > > + len = 2; > > + do { > > + c =

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 15:34 +0800, joeyli wrote: > Hi Matt, > > 於 六,2013-03-02 於 07:41 +0800,joeyli 提到: > > 於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: > > > On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: > > > > On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: > > > > > From:

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Lingzhu Xiang
On 03/06/2013 03:34 PM, joeyli wrote: > +static unsigned long variable_name_length(efi_char16_t *variable_name) > +{ > + unsigned long len; > + efi_char16_t c; > + > + len = 2; > + do { > + c = variable_name[len / sizeof(c) - 1]; > + if (c) > +

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Lingzhu Xiang
On 03/06/2013 03:34 PM, joeyli wrote: +static unsigned long variable_name_length(efi_char16_t *variable_name) +{ + unsigned long len; + efi_char16_t c; + + len = 2; + do { + c = variable_name[len / sizeof(c) - 1]; + if (c) + len

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 15:34 +0800, joeyli wrote: Hi Matt, 於 六,2013-03-02 於 07:41 +0800,joeyli 提到: 於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: From: Michael Schroeder

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 17:20 +0800, Lingzhu Xiang wrote: On 03/06/2013 03:34 PM, joeyli wrote: +static unsigned long variable_name_length(efi_char16_t *variable_name) +{ + unsigned long len; + efi_char16_t c; + + len = 2; + do { + c = variable_name[len / sizeof(c)

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Frederic Crozat
Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : Also, which machine did you see this behaviour on? HP z220 desktop, System BIOS K51 v 1.54 this issue is only the Secure Boot related variables, which make me think HP incorrectly created them in their latest firmware (where they

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 12:58 +0100, Frederic Crozat wrote: Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : Also, which machine did you see this behaviour on? HP z220 desktop, System BIOS K51 v 1.54 this issue is only the Secure Boot related variables, which make me think

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Frederic Crozat
Le mercredi 06 mars 2013 à 12:36 +, Matt Fleming a écrit : On Wed, 2013-03-06 at 12:58 +0100, Frederic Crozat wrote: Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : Also, which machine did you see this behaviour on? HP z220 desktop, System BIOS K51 v 1.54 this

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-06 Thread Matt Fleming
On Wed, 2013-03-06 at 14:30 +0100, Frederic Crozat wrote: Le mercredi 06 mars 2013 à 12:36 +, Matt Fleming a écrit : On Wed, 2013-03-06 at 12:58 +0100, Frederic Crozat wrote: Le mercredi 06 mars 2013 à 11:19 +, Matt Fleming a écrit : Also, which machine did you see this

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-05 Thread joeyli
於 三,2013-03-06 於 15:34 +0800,joeyli 提到: > Hi Matt, > > 於 六,2013-03-02 於 07:41 +0800,joeyli 提到: > > 於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: > > > On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: > > > > On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: > > > > > From: Michael

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-05 Thread joeyli
Hi Matt, 於 六,2013-03-02 於 07:41 +0800,joeyli 提到: > 於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: > > On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: > > > On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: > > > > From: Michael Schroeder > > > > > > > > On HP z220 system (firmware

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-05 Thread joeyli
Hi Matt, 於 六,2013-03-02 於 07:41 +0800,joeyli 提到: 於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: From: Michael Schroeder m...@suse.com On HP z220 system (firmware

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-05 Thread joeyli
於 三,2013-03-06 於 15:34 +0800,joeyli 提到: Hi Matt, 於 六,2013-03-02 於 07:41 +0800,joeyli 提到: 於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: From: Michael Schroeder

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread joeyli
於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: > On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: > > On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: > > > From: Michael Schroeder > > > > > > On HP z220 system (firmware version 1.54), some EFI variables are > > > incorrectly > > >

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread Matt Fleming
On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: > On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: > > From: Michael Schroeder > > > > On HP z220 system (firmware version 1.54), some EFI variables are > > incorrectly > > named : > > > > ls -d /sys/firmware/efi/vars/*8be4d* | grep

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread Matt Fleming
On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: > From: Michael Schroeder > > On HP z220 system (firmware version 1.54), some EFI variables are incorrectly > named : > > ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns >

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread joeyli
於 五,2013-03-01 於 17:31 +0800,Lingzhu Xiang 提到: > On 03/01/2013 11:20 AM, Lee, Chun-Yi wrote: > > From: Michael Schroeder > > > > On HP z220 system (firmware version 1.54), some EFI variables are > > incorrectly > > named : > > > > ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread Lingzhu Xiang
On 03/01/2013 11:20 AM, Lee, Chun-Yi wrote: > From: Michael Schroeder > > On HP z220 system (firmware version 1.54), some EFI variables are incorrectly > named : > > ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns >

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread Lingzhu Xiang
On 03/01/2013 11:20 AM, Lee, Chun-Yi wrote: From: Michael Schroeder m...@suse.com On HP z220 system (firmware version 1.54), some EFI variables are incorrectly named : ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread joeyli
於 五,2013-03-01 於 17:31 +0800,Lingzhu Xiang 提到: On 03/01/2013 11:20 AM, Lee, Chun-Yi wrote: From: Michael Schroeder m...@suse.com On HP z220 system (firmware version 1.54), some EFI variables are incorrectly named : ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread Matt Fleming
On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: From: Michael Schroeder m...@suse.com On HP z220 system (firmware version 1.54), some EFI variables are incorrectly named : ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread Matt Fleming
On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: From: Michael Schroeder m...@suse.com On HP z220 system (firmware version 1.54), some EFI variables are incorrectly named : ls -d /sys/firmware/efi/vars/*8be4d* | grep -v

Re: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash

2013-03-01 Thread joeyli
於 五,2013-03-01 於 16:31 +,Matt Fleming 提到: On Fri, 2013-03-01 at 15:17 +, Matt Fleming wrote: On Fri, 2013-03-01 at 11:20 +0800, Lee, Chun-Yi wrote: From: Michael Schroeder m...@suse.com On HP z220 system (firmware version 1.54), some EFI variables are incorrectly named