All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] cmd: avb: Fix requested partitions list
@ 2019-08-15 17:49 Sam Protsenko
  2019-10-16  9:38 ` Igor Opaniuk
  2019-11-01 13:29 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Sam Protsenko @ 2019-08-15 17:49 UTC (permalink / raw)
  To: u-boot

The requested_partitions[] array should contain only boot partitions.
Usually it's only 'boot' partition, as can be seen in [1]. Also, seems
like the requested_partitions[] are only used when there is no 'vbmeta'
partition [2], which is not a regular use-case.

Make requested_partitions[] contain only 'boot' partition as it was
supposed to be, and also make that array to be a local in
do_avb_verify_part() function, as nobody else needs that.

[1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108
[2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
Changes in v2:
  - fix links in commit message (suggested by Eugeniu Rosca)

 cmd/avb.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/cmd/avb.c b/cmd/avb.c
index a8a95034ca..a4de5c40a2 100644
--- a/cmd/avb.c
+++ b/cmd/avb.c
@@ -15,11 +15,6 @@
 #define AVB_BOOTARGS	"avb_bootargs"
 static struct AvbOps *avb_ops;
 
-static const char * const requested_partitions[] = {"boot",
-					     "system",
-					     "vendor",
-					     NULL};
-
 int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	unsigned long mmc_dev;
@@ -232,6 +227,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
 int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
 		       int argc, char *const argv[])
 {
+	const char * const requested_partitions[] = {"boot", NULL};
 	AvbSlotVerifyResult slot_result;
 	AvbSlotVerifyData *out_data;
 	char *cmdline;
-- 
2.23.0.rc1

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

* [U-Boot] [PATCH v2] cmd: avb: Fix requested partitions list
  2019-08-15 17:49 [U-Boot] [PATCH v2] cmd: avb: Fix requested partitions list Sam Protsenko
@ 2019-10-16  9:38 ` Igor Opaniuk
  2019-11-01 13:29 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Igor Opaniuk @ 2019-10-16  9:38 UTC (permalink / raw)
  To: u-boot

Hi Sam,

On Thu, Aug 15, 2019 at 8:49 PM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>
> The requested_partitions[] array should contain only boot partitions.
> Usually it's only 'boot' partition, as can be seen in [1]. Also, seems
> like the requested_partitions[] are only used when there is no 'vbmeta'
> partition [2], which is not a regular use-case.
>
> Make requested_partitions[] contain only 'boot' partition as it was
> supposed to be, and also make that array to be a local in
> do_avb_verify_part() function, as nobody else needs that.
>
> [1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108
> [2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461
>
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> Changes in v2:
>   - fix links in commit message (suggested by Eugeniu Rosca)
>
>  cmd/avb.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/cmd/avb.c b/cmd/avb.c
> index a8a95034ca..a4de5c40a2 100644
> --- a/cmd/avb.c
> +++ b/cmd/avb.c
> @@ -15,11 +15,6 @@
>  #define AVB_BOOTARGS   "avb_bootargs"
>  static struct AvbOps *avb_ops;
>
> -static const char * const requested_partitions[] = {"boot",
> -                                            "system",
> -                                            "vendor",
> -                                            NULL};
> -
>  int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  {
>         unsigned long mmc_dev;
> @@ -232,6 +227,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
>  int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
>                        int argc, char *const argv[])
>  {
> +       const char * const requested_partitions[] = {"boot", NULL};
>         AvbSlotVerifyResult slot_result;
>         AvbSlotVerifyData *out_data;
>         char *cmdline;
> --
> 2.23.0.rc1
>

Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>

-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

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

* [U-Boot] [PATCH v2] cmd: avb: Fix requested partitions list
  2019-08-15 17:49 [U-Boot] [PATCH v2] cmd: avb: Fix requested partitions list Sam Protsenko
  2019-10-16  9:38 ` Igor Opaniuk
@ 2019-11-01 13:29 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2019-11-01 13:29 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 15, 2019 at 08:49:47PM +0300, Sam Protsenko wrote:

> The requested_partitions[] array should contain only boot partitions.
> Usually it's only 'boot' partition, as can be seen in [1]. Also, seems
> like the requested_partitions[] are only used when there is no 'vbmeta'
> partition [2], which is not a regular use-case.
> 
> Make requested_partitions[] contain only 'boot' partition as it was
> supposed to be, and also make that array to be a local in
> do_avb_verify_part() function, as nobody else needs that.
> 
> [1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108
> [2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191101/37e245a3/attachment.sig>

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

end of thread, other threads:[~2019-11-01 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 17:49 [U-Boot] [PATCH v2] cmd: avb: Fix requested partitions list Sam Protsenko
2019-10-16  9:38 ` Igor Opaniuk
2019-11-01 13:29 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.