Skip to content

Move TCG and vendor command buffers to the heap in small-stack builds #30

Description

@aidangarske

Context

WOLFSPDM_DYNAMIC_MEMORY (wolfTPM --enable-smallstack) only heap-allocates the context and the ML-DSA key. The TCG transport and vendor command paths still keep their per-call buffers on the stack, same as wolfTPM master.

Origin

main...wolftpm-core

What is needed

  • Allocate the TCG transport and vendor command scratch buffers with XMALLOC under WOLFSPDM_DYNAMIC_MEMORY, freeing on every path.
  • Measure peak stack before and after.

Blockers and dependencies

No response

Acceptance criteria

Small-stack Nuvoton and Nations builds pass; valgrind clean; measured stack drop recorded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, warnings, hardware-gated or future worktodoDeferred work tracked for later

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions