Skip to content

io: improve APDU handling - #1701

Open
jarevalo-ledger wants to merge 1 commit into
masterfrom
os/sys-io-improvments
Open

io: improve APDU handling#1701
jarevalo-ledger wants to merge 1 commit into
masterfrom
os/sys-io-improvments

Conversation

@jarevalo-ledger

Copy link
Copy Markdown
Contributor

Description

Improve APDU handling.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Tests
  • Documentation
  • Other (for changes that might not fit in any category)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it.

Additional comments

Please post additional comments in this section if you have them, otherwise delete it.

Auto cherry-pick in API_LEVEL

If requested to port the commits from this PR on a dedicated API_LEVEL branch,
select the targeted one(s), or add new references if not listed:

[ ] TARGET_API_LEVEL: API_LEVEL_26
[ ] TARGET_API_LEVEL: API_LEVEL_27

This will only create the PR with cherry-picks, ready to be reviewed and merged.

Remember:

  • The merge will ALWAYS be a manual operation.
  • It is possible the cherry-picks don't apply correctly, mainly if previous commits have been forgotten.
  • In case of failure, there is no other solution than redo the operation manually...

@codecov-commenter

codecov-commenter commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.23%. Comparing base (149bc18) to head (6aea963).

Files with missing lines Patch % Lines
io/src/os_io.c 0.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1701      +/-   ##
==========================================
- Coverage   39.66%   36.23%   -3.44%     
==========================================
  Files         239      239              
  Lines       23196    23218      +22     
  Branches     4622     4635      +13     
==========================================
- Hits         9201     8413     -788     
- Misses      13485    14225     +740     
- Partials      510      580      +70     
Flag Coverage Δ
fuzzing 18.07% <0.00%> (-6.07%) ⬇️
unittests 89.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Code coverage report

Code Coverage

Per-file coverage
Package Line Rate Branch Rate Health
include 93% 50%
lib_cxng.include 100% 0%
lib_tlv 92% 80%
lib_tlv.use_cases 91% 76%
.........tmp.cmake-fetch-deps.cmock-src.src 45% 34%
.........tmp.cmake-fetch-deps.unity-src.src 13% 7%
lib_alloc 94% 81%
.........tmp.cmake-fetch-deps.cmock-src.src 40% 28%
.........tmp.cmake-fetch-deps.unity-src.src 13% 7%
lib_lists 94% 73%
.........tmp.cmake-fetch-deps.cmock-src.src 0% 0%
.........tmp.cmake-fetch-deps.unity-src.src 10% 3%
lib_standard_app 89% 81%
.........tmp.cmake-fetch-deps.cmock-src.src 0% 0%
.........tmp.cmake-fetch-deps.unity-src.src 13% 7%
lib_standard_app 100% 87%
.........tmp.cmake-fetch-deps.cmock-src.src 16% 5%
.........tmp.cmake-fetch-deps.unity-src.src 12% 6%
src 68% 60%
.........tmp.cmake-fetch-deps.cmock-src.src 16% 5%
.........tmp.cmake-fetch-deps.unity-src.src 11% 5%
.........usr.include 100% 0%
app_features.address_book.src 88% 73%
include 100% 0%
lib_standard_app 20% 27%
lib_tlv 72% 52%
.........tmp.cmake-fetch-deps.cmock-src.src 44% 33%
.........tmp.cmake-fetch-deps.unity-src.src 14% 8%
Summary 33% (3448 / 9622) 23% (1534 / 6222)

Comment thread io/src/os_io.c
uint16_t dst_max_len = buffer_max_length;

if (apdu_slot_is_busy()) {
dst = G_io_seph_buffer;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be G_io_tx_buffer as done in os_io_handle_ux_event_reject_apdu function.

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

Successfully merging this pull request may close these issues.

3 participants