Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread joeyli
於 四,2013-09-05 於 11:31 +0100,Matt Fleming 提到: > On Thu, 05 Sep, at 06:13:36PM, joeyli wrote: > > This S4WakeKey is a VOLATILE variable that could not modify by > > SetVariable() at runtime. So, it's read only even through efivars. > > > > Does it what your concern? > > No, the UEFI spec

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread Matt Fleming
On Thu, 05 Sep, at 06:13:36PM, joeyli wrote: > This S4WakeKey is a VOLATILE variable that could not modify by > SetVariable() at runtime. So, it's read only even through efivars. > > Does it what your concern? No, the UEFI spec probibits certain runtime functions from being executed

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread joeyli
Hi Matt, First, thanks for your review! 於 四,2013-09-05 於 09:53 +0100,Matt Fleming 提到: > On Thu, 22 Aug, at 07:01:50PM, Lee, Chun-Yi wrote: > > +static int efi_status_to_err(efi_status_t status) > > +{ > > + int err; > > + > > + switch (status) { > > + case EFI_INVALID_PARAMETER: > > +

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread Matt Fleming
On Thu, 22 Aug, at 07:01:50PM, Lee, Chun-Yi wrote: > +static int efi_status_to_err(efi_status_t status) > +{ > + int err; > + > + switch (status) { > + case EFI_INVALID_PARAMETER: > + err = -EINVAL; > + break; > + case EFI_OUT_OF_RESOURCES: > +

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread Matt Fleming
On Thu, 22 Aug, at 07:01:50PM, Lee, Chun-Yi wrote: +static int efi_status_to_err(efi_status_t status) +{ + int err; + + switch (status) { + case EFI_INVALID_PARAMETER: + err = -EINVAL; + break; + case EFI_OUT_OF_RESOURCES: + err =

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread joeyli
Hi Matt, First, thanks for your review! 於 四,2013-09-05 於 09:53 +0100,Matt Fleming 提到: On Thu, 22 Aug, at 07:01:50PM, Lee, Chun-Yi wrote: +static int efi_status_to_err(efi_status_t status) +{ + int err; + + switch (status) { + case EFI_INVALID_PARAMETER: + err =

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread Matt Fleming
On Thu, 05 Sep, at 06:13:36PM, joeyli wrote: This S4WakeKey is a VOLATILE variable that could not modify by SetVariable() at runtime. So, it's read only even through efivars. Does it what your concern? No, the UEFI spec probibits certain runtime functions from being executed concurrently

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-09-05 Thread joeyli
於 四,2013-09-05 於 11:31 +0100,Matt Fleming 提到: On Thu, 05 Sep, at 06:13:36PM, joeyli wrote: This S4WakeKey is a VOLATILE variable that could not modify by SetVariable() at runtime. So, it's read only even through efivars. Does it what your concern? No, the UEFI spec probibits certain

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Pavel Machek
On Tue 2013-08-27 14:01:42, Manfred Hollstein wrote: > On Tue, 27 Aug 2013, 13:29:43 +0200, Pavel Machek wrote: > > > > > @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, > > > > > efi_system_table_t *_table, > > > > > > > > > > setup_efi_pci(boot_params); > > > > > > >

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread joeyli
於 二,2013-08-27 於 13:29 +0200,Pavel Machek 提到: > > > > @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, > > > > efi_system_table_t *_table, > > > > > > > > setup_efi_pci(boot_params); > > > > > > > > +#ifdef CONFIG_SNAPSHOT_VERIFICATION > > > > +

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Manfred Hollstein
On Tue, 27 Aug 2013, 13:29:43 +0200, Pavel Machek wrote: > > > > @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, > > > > efi_system_table_t *_table, > > > > > > > > setup_efi_pci(boot_params); > > > > > > > > +#ifdef CONFIG_SNAPSHOT_VERIFICATION > > > > +

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Pavel Machek
> > > @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, > > > efi_system_table_t *_table, > > > > > > setup_efi_pci(boot_params); > > > > > > +#ifdef CONFIG_SNAPSHOT_VERIFICATION > > > + setup_s4_keys(boot_params); > > > +#endif > > > + > > > > Move ifdef inside the

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread joeyli
Hi Pavel, 於 日,2013-08-25 於 18:25 +0200,Pavel Machek 提到: > On Thu 2013-08-22 19:01:50, Lee, Chun-Yi wrote: > > Introduced a hibernate_key.c file to query the key pair from EFI variables > > and maintain key pair for check signature of S4 snapshot image. We > > loaded the private key when snapshot

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread joeyli
Hi Pavel, 於 日,2013-08-25 於 18:25 +0200,Pavel Machek 提到: On Thu 2013-08-22 19:01:50, Lee, Chun-Yi wrote: Introduced a hibernate_key.c file to query the key pair from EFI variables and maintain key pair for check signature of S4 snapshot image. We loaded the private key when snapshot image

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Pavel Machek
@@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table, setup_efi_pci(boot_params); +#ifdef CONFIG_SNAPSHOT_VERIFICATION + setup_s4_keys(boot_params); +#endif + Move ifdef inside the function? OK, I will define a

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Manfred Hollstein
On Tue, 27 Aug 2013, 13:29:43 +0200, Pavel Machek wrote: @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table, setup_efi_pci(boot_params); +#ifdef CONFIG_SNAPSHOT_VERIFICATION + setup_s4_keys(boot_params);

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread joeyli
於 二,2013-08-27 於 13:29 +0200,Pavel Machek 提到: @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table, setup_efi_pci(boot_params); +#ifdef CONFIG_SNAPSHOT_VERIFICATION + setup_s4_keys(boot_params); +#endif

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Pavel Machek
On Tue 2013-08-27 14:01:42, Manfred Hollstein wrote: On Tue, 27 Aug 2013, 13:29:43 +0200, Pavel Machek wrote: @@ -1205,6 +1290,10 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table, setup_efi_pci(boot_params); +#ifdef

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-25 Thread Pavel Machek
On Thu 2013-08-22 19:01:50, Lee, Chun-Yi wrote: > Introduced a hibernate_key.c file to query the key pair from EFI variables > and maintain key pair for check signature of S4 snapshot image. We > loaded the private key when snapshot image stored success. > > This patch introduced 2 EFI variables

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-25 Thread Pavel Machek
On Thu 2013-08-22 19:01:50, Lee, Chun-Yi wrote: Introduced a hibernate_key.c file to query the key pair from EFI variables and maintain key pair for check signature of S4 snapshot image. We loaded the private key when snapshot image stored success. This patch introduced 2 EFI variables for

[PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-22 Thread Lee, Chun-Yi
Introduced a hibernate_key.c file to query the key pair from EFI variables and maintain key pair for check signature of S4 snapshot image. We loaded the private key when snapshot image stored success. This patch introduced 2 EFI variables for store the key to sign S4 image and verify signature

[PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-22 Thread Lee, Chun-Yi
Introduced a hibernate_key.c file to query the key pair from EFI variables and maintain key pair for check signature of S4 snapshot image. We loaded the private key when snapshot image stored success. This patch introduced 2 EFI variables for store the key to sign S4 image and verify signature