<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/u-boot.git/common/avb_verify.c, branch master</title>
<subtitle>StarFive Tech U-Boot for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/'/>
<updated>2021-03-17T16:50:19+00:00</updated>
<entry>
<title>avb: Fix error when partition not found</title>
<updated>2021-03-17T16:50:19+00:00</updated>
<author>
<name>schspa</name>
<email>schspa@gmail.com</email>
</author>
<published>2021-02-25T16:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=0453411998ed4425c5c1543de53ff7474bd42eea'/>
<id>urn:sha1:0453411998ed4425c5c1543de53ff7474bd42eea</id>
<content type='text'>
part_get_info_by_name will return -1 on error, and &gt;0 on success.

Signed-off-by: schspa &lt;schspa@gmail.com&gt;
Cc: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</content>
</entry>
<entry>
<title>avb: Make AVB independent of fastboot</title>
<updated>2020-08-24T18:11:13+00:00</updated>
<author>
<name>Usama Arif</name>
<email>usama.arif@arm.com</email>
</author>
<published>2020-08-11T14:46:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=e61b41517d2a91080f6416fdfb46efab9e5a55b4'/>
<id>urn:sha1:e61b41517d2a91080f6416fdfb46efab9e5a55b4</id>
<content type='text'>
AVB only uses CONFIG_FASTBOOT_BUF_ADDR from fastboot for memory.
This memory is used for assigning temporary buffers.
This can be assigned a new variable and used as CONFIG_AVB_BUF_ADDR.
This is to support future boards that support AVB but dont support
USB and therefore dont support FASTBOOT.

Signed-off-by: Usama Arif &lt;usama.arif@arm.com&gt;
Cc: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
[trini: Change defaults]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>common: Move ARM cache operations out of common.h</title>
<updated>2019-12-02T23:24:58+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-11-14T19:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=1eb69ae498567bb0b62ee554647204e8245cdacc'/>
<id>urn:sha1:1eb69ae498567bb0b62ee554647204e8245cdacc</id>
<content type='text'>
These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>avb: Fix build when CONFIG_OPTEE_TA_AVB is disabled</title>
<updated>2019-08-07T19:31:04+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2019-07-31T16:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=f254bd02a0754402feaed2e5ec5aba4c5f1512e1'/>
<id>urn:sha1:f254bd02a0754402feaed2e5ec5aba4c5f1512e1</id>
<content type='text'>
When having only these AVB related configs enabled:

    CONFIG_AVB_VERIFY=y
    CONFIG_CMD_AVB=y
    CONFIG_LIBAVB=y

build fails with next errors:

    common/avb_verify.c: In function 'read_persistent_value':
    common/avb_verify.c:867:6: warning: implicit declaration of function
                                        'get_open_session'
    common/avb_verify.c:870:45: error: 'struct AvbOpsData' has no member
                                        named 'tee'
    common/avb_verify.c:894:7: warning: implicit declaration of function
                                        'invoke_func'
    common/avb_verify.c: In function 'write_persistent_value':
    common/avb_verify.c:931:45: error: 'struct AvbOpsData' has no member
                                       named 'tee'

Guard read_persistent_value() and write_persistent_value() functions
by checking if CONFIG_OPTEE_TA_AVB is enabled (as those are only used in
that case) to fix the build with mentioned configuration.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</content>
</entry>
<entry>
<title>avb: add support for named persistent values</title>
<updated>2019-04-26T22:58:22+00:00</updated>
<author>
<name>Igor Opaniuk</name>
<email>igor.opaniuk@gmail.com</email>
</author>
<published>2019-04-09T13:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=fc1fe01b08cedd77a194bb82fa81af4fe1e39031'/>
<id>urn:sha1:fc1fe01b08cedd77a194bb82fa81af4fe1e39031</id>
<content type='text'>
AVB 2.0 spec. revision 1.1 introduces support for named persistent values
that must be tamper evident and allows AVB to store arbitrary key-value
pairs [1].

Introduce implementation of two additional AVB operations
read_persistent_value()/write_persistent_value() for retrieving/storing
named persistent values.

Correspondent pull request in the OP-TEE OS project repo [2].

[1]: https://android.googlesource.com/platform/external/avb/+/android-9.0.0_r22
[2]: https://github.com/OP-TEE/optee_os/pull/2699

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</content>
</entry>
<entry>
<title>avb_verify: support using OP-TEE TA AVB</title>
<updated>2018-10-07T15:07:25+00:00</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2018-09-25T14:40:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=6663e074780912b01c09afd0c139f29825f7775c'/>
<id>urn:sha1:6663e074780912b01c09afd0c139f29825f7775c</id>
<content type='text'>
With CONFIG_OPTEE_TA_AVB use the trusted application AVB provided by
OP-TEE to manage rollback indexes and device-lock status.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>common: avb_verify: Fix division by zero in mmc_byte_io()</title>
<updated>2018-08-24T17:19:53+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>roscaeugeniu@gmail.com</email>
</author>
<published>2018-08-14T00:43:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=e1904f4530a3415efac306adc6d4f5df7a051560'/>
<id>urn:sha1:e1904f4530a3415efac306adc6d4f5df7a051560</id>
<content type='text'>
Compiling U-Boot with ubsan/asan libraries and running it in sandbox
may lead to below backtrace:

 =&gt; avb init 0
 =&gt; avb verify
 ## Android Verified Boot 2.0 version 1.1.0
read_is_device_unlocked not supported yet
common/avb_verify.c:407:31: runtime error: division by zero
AddressSanitizer:DEADLYSIGNAL
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@linaro.org&gt;

=================================================================
==9388==ERROR: AddressSanitizer: FPE on unknown address 0x0000004b467f \
    (pc 0x0000004b467f bp 0x000000000000 sp 0x7ffd899fe150 T0)
    #0 0x4b467e in mmc_byte_io common/avb_verify.c:407
    #1 0x4b4c47 in mmc_byte_io common/avb_verify.c:532
    #2 0x4b4c47 in read_from_partition common/avb_verify.c:533
    #3 0x69dc0d in load_and_verify_vbmeta lib/libavb/avb_slot_verify.c:560
    #4 0x6a1ee6 in avb_slot_verify lib/libavb/avb_slot_verify.c:1139
    #5 0x45dabd in do_avb_verify_part cmd/avb.c:245
    #6 0x4af77c in cmd_call common/command.c:499
    #7 0x4af77c in cmd_process common/command.c:538
    #8 0x46bafc in run_pipe_real common/cli_hush.c:1677
    #9 0x46bafc in run_list_real common/cli_hush.c:1875
    #10 0x46c780 in run_list common/cli_hush.c:2024
    #11 0x46c780 in parse_stream_outer common/cli_hush.c:3216
    #12 0x46d34b in parse_file_outer common/cli_hush.c:3299
    #13 0x4ad609 in cli_loop common/cli.c:217
    #14 0x4625ae in main_loop common/main.c:65
    #15 0x46f2d1 in run_main_loop common/board_r.c:648
    #16 0x640253 in initcall_run_list lib/initcall.c:30
    #17 0x46f9d0 in board_init_r common/board_r.c:879
    #18 0x40539b in main arch/sandbox/cpu/start.c:321
    #19 0x7fa94925f82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #20 0x408908 in _start (/srv/R/u-boot-master/u-boot+0x408908)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE common/avb_verify.c:407 in mmc_byte_io
==9388==ABORTING

Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
</content>
</entry>
<entry>
<title>common: avb_verify: Fix never-occurring avb_free(ops_data)</title>
<updated>2018-08-24T17:19:53+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>roscaeugeniu@gmail.com</email>
</author>
<published>2018-08-14T00:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=47e41631bbb9348eac0ee7771b08d5ba7fdd6d5f'/>
<id>urn:sha1:47e41631bbb9348eac0ee7771b08d5ba7fdd6d5f</id>
<content type='text'>
Cppcheck (v1.85) reports w/o this patch:

[common/avb_verify.c:738] -&gt; [common/avb_verify.c:741]: (warning) \
  Either the condition 'ops' is redundant or there is possible null \
  pointer dereference: ops.

Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@linaro.org&gt;
</content>
</entry>
<entry>
<title>common: avb_verify: Fix memory leaks</title>
<updated>2018-08-24T17:19:53+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>roscaeugeniu@gmail.com</email>
</author>
<published>2018-08-14T00:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=047bc5c75503105bf8ee66db793d9d249c281521'/>
<id>urn:sha1:047bc5c75503105bf8ee66db793d9d249c281521</id>
<content type='text'>
Cppcheck (v1.85) reports w/o this patch:

[common/avb_verify.c:351]: (error) Memory leak: part
[common/avb_verify.c:356]: (error) Memory leak: part
[common/avb_verify.c:361]: (error) Memory leak: part
[common/avb_verify.c:366]: (error) Memory leak: part

Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@linaro.org&gt;
</content>
</entry>
<entry>
<title>common: avb_verify: Make local data static</title>
<updated>2018-08-24T17:19:53+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>roscaeugeniu@gmail.com</email>
</author>
<published>2018-08-14T00:43:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=55d56d23479c57e530abbcc82459ca641d2ce7d8'/>
<id>urn:sha1:55d56d23479c57e530abbcc82459ca641d2ce7d8</id>
<content type='text'>
Fix sparse complaint:

common/avb_verify.c:14:21: warning: \
  symbol 'avb_root_pub' was not declared. Should it be static?

Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@linaro.org&gt;
</content>
</entry>
</feed>
