Skip to content

Update standard operations section#66

Merged
danh-arm merged 5 commits intomainfrom
mp/std_operations
Jan 20, 2026
Merged

Update standard operations section#66
danh-arm merged 5 commits intomainfrom
mp/std_operations

Conversation

@manish-pandey-arm
Copy link
Contributor

Provide details around security considerations and add new standard operations like "Removing a TE" and "Overwriting a TE" as mentioned in #62

#. Add `align8(te.hdr_size + te.data_size)` to `te_base_addr`.


Adding a void TE
Copy link
Contributor

Choose a reason for hiding this comment

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

I kind of agree with this but would go one step further. If we're adding an "Overwriting a TE" section then I think this it's unnecessary to have this operation also embedded within the existing "Adding a TE" section. So I would remove that bit from "Adding a TE", rename it to "Append a TE", and inline this "Overwriting part of the TL with a void TE" operation within the "Overwriting a TE" section.

sjg20
sjg20 previously approved these changes May 12, 2025
jmarinho
jmarinho previously approved these changes Jul 3, 2025
@jmarinho
Copy link
Contributor

jmarinho commented Jul 3, 2025

This set of changes looks good to me.

The overarching comment I have (which is unrelated to this PR) is whether the Standard Operation Section is needed now that we have a library implementation.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
@manish-pandey-arm manish-pandey-arm dismissed stale reviews from jmarinho and sjg20 via d201a3e December 11, 2025 15:50
@manish-pandey-arm manish-pandey-arm force-pushed the mp/std_operations branch 2 times, most recently from d201a3e to fcabbcb Compare December 11, 2025 16:17
jmarinho
jmarinho previously approved these changes Dec 12, 2025
Copy link
Contributor

@jmarinho jmarinho left a comment

Choose a reason for hiding this comment

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

small set of nits, but otherwise LGTM


#. If `has_checksum`, subtract `te.hdr_size + data_size` bytes starting at `te_base_addr` from `tl.checksum`

#. Set `te.tag_id` (`te_base_addr + 0x0`) to `0x0` (XFERLIST_VOID)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm in two minds about providing the offsets explicitly (e.g. te_base_addr + 0x3). On one hand it's a useful reference for the implementer, but it may prove a bit of a burden to maintain down the line. As I understand it, the header layout is liable to change. If it does, we'd have to fix all the places in the spec where we reference hard-coded offsets. Given the structure is well defined, I think it's probably sufficient to just refer to it directly (i.e. te.tag_id).

Copy link
Contributor Author

@manish-pandey-arm manish-pandey-arm Dec 15, 2025

Choose a reason for hiding this comment

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

We can do this universally when migrating to appendinx ?

Steps for adding a void TE was already described in creating a new TE
but this operation can be used at multiple places so introduce it as
stand alone operation so that it can be referenced elsewhere.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
jmarinho
jmarinho previously approved these changes Dec 15, 2025
Copy link
Contributor

@jmarinho jmarinho left a comment

Choose a reason for hiding this comment

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

LGTM

Overwrite operation is used to replace content of a given TE

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Updated the "Standard Operations" section to consistently use
`te.hdr_size` instead of the hardcoded `0x8`. Also add a note explaining
the assumption of `te.hdr_size = 0x8` and its potential future
configurability. This improves consistency, avoids magic numbers, and
prepares the format for variable-sized TE headers.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
@danh-arm danh-arm mentioned this pull request Dec 18, 2025
Copy link
Contributor

@jmarinho jmarinho left a comment

Choose a reason for hiding this comment

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

LGTM

sjg20
sjg20 previously requested changes Jan 5, 2026
Copy link
Contributor

@sjg20 sjg20 left a comment

Choose a reason for hiding this comment

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

LGTM with one comment


Overwriting a TE
^^^^^^^^^^^^^^^^

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be useful to define or motivate this more clearly. Why would one want to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Overwriting a TE is a space-efficient way to update the data associated with an existing tag without changing its position in the transfer list. This is useful in scenarios where the tag ID remains valid, and only the payload needs to be refreshed. It avoids the overhead of allocating new space and modifying the TL structure unless the new data exceeds the original size, in which case a replacement strategy is triggered.

@sjg20 Do you these comments in spec or you happy with current version ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@danh-arm, could you please merge this PR? @sjg20 is happy with the patch, aside from a single minor nit.

Copy link
Contributor

@danh-arm danh-arm left a comment

Choose a reason for hiding this comment

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

Just 1 minor comment that can be addressed later


.. note::
After relocating a TL, implementations should consider scrubbing the old TL memory if it contains
any secrets that might be accessible to later untrusted software.
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: I think this note also applies in the case of Removing a TE or Overwriting a TE. This could perhaps be duplicated or placed in a more general section?

@danh-arm danh-arm dismissed stale reviews from jwerner-chromium and sjg20 January 20, 2026 16:59

Comments have been addressed in latest version

@danh-arm danh-arm merged commit 7f3f89b into main Jan 20, 2026
2 checks passed
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.

6 participants