Skip to content

Extract kernel object sizes from headers#456

Open
Ivan-Velickovic wants to merge 2 commits intomainfrom
object_sizes_from_kernel
Open

Extract kernel object sizes from headers#456
Ivan-Velickovic wants to merge 2 commits intomainfrom
object_sizes_from_kernel

Conversation

@Ivan-Velickovic
Copy link
Copy Markdown
Collaborator

See commit messages for details.

Addresses #378, but ideally this would be an output of the kernel build itself since it is useful outside of Microkit.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
@Ivan-Velickovic Ivan-Velickovic force-pushed the object_sizes_from_kernel branch 2 times, most recently from 6aa3fc8 to 7ee449d Compare March 27, 2026 03:44
Many of these constants are architecture-dependent, but also slightly
differ depending on how the kernel is configured.

Rather than reproducing all the special combinations of kernel
configurations that affect object size in the tool itself, just read
from the source of truth.

This should prevent bugs such as
7323d07.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
@Ivan-Velickovic Ivan-Velickovic force-pushed the object_sizes_from_kernel branch from 7ee449d to 113fc40 Compare March 27, 2026 03:51
@Indanz
Copy link
Copy Markdown

Indanz commented Mar 27, 2026

These sizes are exported as defines in libsel4/sel4_arch_include/*/sel4/sel4_arch/constants.h, but not in a usable format. Feel free to open a PR in seL4 to export this information properly instead of adding hacks like this.

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.

2 participants