Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sival,triag] Some SiVal ROM_EXT are broken #21706

Open
pamaury opened this issue Feb 27, 2024 · 5 comments
Open

[sival,triag] Some SiVal ROM_EXT are broken #21706

pamaury opened this issue Feb 27, 2024 · 5 comments

Comments

@pamaury
Copy link
Contributor

pamaury commented Feb 27, 2024

Description

The following tests have been found to be broken in //hw/top_earlgrey:fpga_cw310_sival_rom_ext execution environment. See #21580 for details. This issue tracks the lists for further triaging.

  • edn_kat_fpga_cw310_sival_rom_ext -> fixed
  • flash_ctrl_mem_protection_test_fpga_cw310_sival_rom_ext
  • flash_ctrl_test_fpga_cw310_sival_rom_ext
  • pmp_smoketest_tor_fpga_cw310_sival_rom_ext
  • rv_core_ibex_address_translation_test_fpga_cw310_sival_rom_ext
  • sram_ctrl_execution_test_fpga_cw310_sival_rom_ext
  • uart_tx_rx_test_fpga_cw310_sival_rom_ext
  • keymgr_test_fpga_cw310_sival_rom_ext
  • boot_data_functest_fpga_cw310_sival_rom_ext
  • irq_asm_functest_fpga_cw310_sival_rom_ext
  • alert_functest_fpga_cw310_sival_rom_ext
  • keymgr_functest_fpga_cw310_sival_rom_ext
  • rnd_functest_fpga_cw310_sival_rom_ext
  • rstmgr_functest_fpga_cw310_sival_rom_ext
  • watchdog_functest_fpga_cw310_sival_rom_ext
  • mod_exp_otbn_functest_hardcoded_fpga_cw310_sival_rom_ext
  • rsa_verify_functest_fpga_cw310_sival_rom_ext
  • sigverify_dynamic_functest_hardcoded_fpga_cw310_sival_rom_ext
  • chip_power_idle_load_fpga_cw310_sival_rom_ext
  • chip_power_sleep_load_fpga_cw310_sival_rom_ext
  • csrng_edn_concurrency_test_fpga_cw310_sival_rom_ext -> fixed
  • csrng_kat_test_fpga_cw310_sival_rom_ext -> fixed
  • entropy_src_csrng_test_fpga_cw310_sival_rom_ext -> fixed
  • entropy_src_edn_reqs_test_fpga_cw310_sival_rom_ext -> fixed
  • flash_ctrl_clock_freqs_test_fpga_cw310_sival_rom_ext
  • flash_ctrl_ops_test_fpga_cw310_sival_rom_ext
  • keymgr_key_derivation_test_fpga_cw310_sival_rom_ext
  • keymgr_sideload_aes_test_fpga_cw310_sival_rom_ext
  • keymgr_sideload_kmac_test_fpga_cw310_sival_rom_ext
  • lc_ctrl_otp_hw_cfg0_test_fpga_cw310_sival_rom_ext
  • otp_ctrl_smoketest_fpga_cw310_sival_rom_ext
  • pmp_smoketest_napot_fpga_cw310_sival_rom_ext
  • sram_ctrl_sleep_sram_ret_contents_scramble_test_fpga_cw310_sival_rom_ext
  • aes_kwp_sideload_functest_fpga_cw310_sival_rom_ext
  • aes_sideload_functest_fpga_cw310_sival_rom_ext
  • ecdh_p256_sideload_functest_fpga_cw310_sival_rom_ext
  • ecdsa_p256_sideload_functest_fpga_cw310_sival_rom_ext
  • kdf_kmac_sideload_functest_hardcoded_fpga_cw310_sival_rom_ext
  • kmac_sideload_functest_hardcoded_fpga_cw310_sival_rom_ext
  • pwrmgr_random_sleep_all_reset_reqs_test_fpga_cw310_sival_rom_ext
  • pwrmgr_all_reset_reqs_test_fpga_cw310_sival_rom_ext

There are some common patterns but each test needs to be investigated:

  • some are enabled in ROM_EXT but cannot actually run in ROM_EXT because some registers are locked: those should disable the //hw/top_earlgrey:fpga_cw310_sival_rom_ext and enable the //hw/top_earlgrey:fpga_cw310_sival exec env instead
  • some make assumptions about the OTP values in //hw/top_earlgrey:fpga_rom_with_fake_keys but the values in the sival ROM_EXT are different

The corresponding sival issues should be reopened.

@pamaury
Copy link
Contributor Author

pamaury commented Feb 27, 2024

Tag @johngt for visibility

andreaskurth added a commit to andreaskurth/opentitan that referenced this issue Feb 29, 2024
…ival ROM_EXT

This test also seems to be part of issue lowRISC#21706, so this commit marks it
as broken in sival ROM_EXT.

This should fix the currently failing CI checks on `master`.

Signed-off-by: Andreas Kurth <[email protected]>
andreaskurth added a commit to andreaskurth/opentitan that referenced this issue Feb 29, 2024
The following tests also seem to be part of issue lowRISC#21706:
- //sw/device/tests:pwrmgr_all_reset_reqs_test
- //sw/device/tests:pwrmgr_random_sleep_all_reset_reqs_test

Thus this commit marks them as broken in SiVal ROM_EXT.

This should contribute to fixing the currently failing CI checks on
`master`.

Signed-off-by: Andreas Kurth <[email protected]>
andreaskurth added a commit that referenced this issue Feb 29, 2024
The following tests also seem to be part of issue #21706:
- //sw/device/tests:pwrmgr_all_reset_reqs_test
- //sw/device/tests:pwrmgr_random_sleep_all_reset_reqs_test

Thus this commit marks them as broken in SiVal ROM_EXT.

This should contribute to fixing the currently failing CI checks on
`master`.

Signed-off-by: Andreas Kurth <[email protected]>
matutem added a commit to matutem/opentitan that referenced this issue Mar 1, 2024
Also fix minor typos in other pwrmgr top-level test code.

Addresses lowRISC#21706

Signed-off-by: Guillermo Maturana <[email protected]>
matutem added a commit that referenced this issue Mar 1, 2024
Also fix minor typos in other pwrmgr top-level test code.

Addresses #21706

Signed-off-by: Guillermo Maturana <[email protected]>
@matutem
Copy link
Contributor

matutem commented Mar 1, 2024

Also, the test pwrmgr_all_reset_reqs_test_fpga_cw310_sival_rom_ext is passing for me.

This was referenced Mar 4, 2024
This was referenced Mar 29, 2024
@nasahlpa
Copy link
Member

nasahlpa commented Apr 2, 2024

Can confirm that edn_kat_fpga_cw310_sival_rom_ext fails for me. Is there a plan of fixing this test or any idea what is going wrong such that I can fix it?

@jwnrt
Copy link
Contributor

jwnrt commented Apr 16, 2024

We found that sram_ctrl_sleep_sram_ret_contents_scramble_test passes in the test_rom and rom_with_fake_keys environments on the FPGA, but not in the sival or sival_rom_ext environments. The no_scramble variant of the test always passes.

@matute do you know of any OTP configuration that might cause the scramble version to fail on in the sival configurations?

@engdoreis
Copy link
Contributor

engdoreis commented Apr 19, 2024

@matutem I'm looking into pwrmgr_all_reset_reqs_test_fpga_cw310_sival_rom_ext and it is actually flaky. Sometimes an unexpected reset (0x40 = kDifRstmgrResetInfoEscalation) occurs and mess up with the test.
This PR should fix it.

timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 24, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 24, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 25, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 26, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 27, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 29, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit that referenced this issue Apr 30, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses #21706.

Signed-off-by: Tim Trippel <[email protected]>
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue Apr 30, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
(cherry picked from commit 698b5a6)
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue May 1, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
(cherry picked from commit 698b5a6)
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue May 3, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
(cherry picked from commit 698b5a6)
timothytrippel added a commit to timothytrippel/opentitan that referenced this issue May 3, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses lowRISC#21706.

Signed-off-by: Tim Trippel <[email protected]>
(cherry picked from commit 698b5a6)
timothytrippel added a commit that referenced this issue May 4, 2024
The `otbn_boot_services_functest` must run in the ROM_EXT slot since it
manipulates the keygmr state, which normally is done by the ROM_EXT.

This partially addresses #21706.

Signed-off-by: Tim Trippel <[email protected]>
(cherry picked from commit 698b5a6)
vogelpi added a commit to vogelpi/opentitan that referenced this issue May 9, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

lowRISC#22819 (comment)

This is related to lowRISC#21706 and lowRISC#22140.

Signed-off-by: Pirmin Vogel <[email protected]>
vogelpi added a commit to vogelpi/opentitan that referenced this issue May 9, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

lowRISC#22819 (comment)

This is related to lowRISC#21706 and lowRISC#22140.

Signed-off-by: Pirmin Vogel <[email protected]>
vogelpi added a commit that referenced this issue May 10, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

#22819 (comment)

This is related to #21706 and #22140.

Signed-off-by: Pirmin Vogel <[email protected]>
vogelpi added a commit to vogelpi/opentitan that referenced this issue May 10, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

lowRISC#22819 (comment)

This is related to lowRISC#21706 and lowRISC#22140.

Signed-off-by: Pirmin Vogel <[email protected]>
vogelpi added a commit to vogelpi/opentitan that referenced this issue May 10, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

lowRISC#22819 (comment)

This is related to lowRISC#21706 and lowRISC#22140.

Signed-off-by: Pirmin Vogel <[email protected]>
vogelpi added a commit to vogelpi/opentitan that referenced this issue May 10, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

lowRISC#22819 (comment)

This is related to lowRISC#21706 and lowRISC#22140.

Signed-off-by: Pirmin Vogel <[email protected]>
vogelpi added a commit that referenced this issue May 13, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

#22819 (comment)

This is related to #21706 and #22140.

Signed-off-by: Pirmin Vogel <[email protected]>
AlexJones0 pushed a commit to AlexJones0/opentitan that referenced this issue Jul 8, 2024
These tests are all working in ROM_EXT on master and earlgrey_es_sival
now that we've fixed the underlying keymgr issue. For details, see

lowRISC#22819 (comment)

This is related to lowRISC#21706 and lowRISC#22140.

Signed-off-by: Pirmin Vogel <[email protected]>
andrea-caforio added a commit to andrea-caforio/opentitan that referenced this issue Oct 9, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in lowRISC#21706. This commit fixes this and addresses lowRISC#21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
andrea-caforio added a commit to andrea-caforio/opentitan that referenced this issue Oct 9, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in lowRISC#21706. This commit fixes this and addresses lowRISC#21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
andrea-caforio added a commit to andrea-caforio/opentitan that referenced this issue Oct 9, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in lowRISC#21706. This commit fixes this and addresses lowRISC#21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
andrea-caforio added a commit to andrea-caforio/opentitan that referenced this issue Oct 9, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in lowRISC#21706. This commit fixes this and addresses lowRISC#21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
andrea-caforio added a commit to andrea-caforio/opentitan that referenced this issue Oct 10, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in lowRISC#21706. This commit fixes this and addresses lowRISC#21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
jwnrt pushed a commit that referenced this issue Oct 10, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in #21706. This commit fixes this and addresses #21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
github-actions bot pushed a commit that referenced this issue Nov 13, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in #21706. This commit fixes this and addresses #21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
(cherry picked from commit aa4031d)
luismarques pushed a commit that referenced this issue Nov 14, 2024
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as
broken in #21706. This commit fixes this and addresses #21500.

The source of the bug is due to the nature of the ROM_EXT that runs
through a CDI attestation flow advancing the key manager state to
"OwnerRootKey" in the process. This was not accounted for in the test,
which assumed an active "CreatorRootKey" state (this works for sim_dv
tests but not with ROM_EXT). The solution to this issue lies in
rendering the test state-agnostic, meaning it will execute its
verifications independently of the current key manager state. This
approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which
follow a similar strategy.

Signed-off-by: Andrea Caforio <[email protected]>
(cherry picked from commit aa4031d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants