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

syscall stack usage report #27189

Open
andrewboie opened this issue Jul 27, 2020 · 3 comments
Open

syscall stack usage report #27189

andrewboie opened this issue Jul 27, 2020 · 3 comments
Assignees
Labels
area: Memory Management area: Memory Protection Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take

Comments

@andrewboie
Copy link
Contributor

andrewboie commented Jul 27, 2020

Is your enhancement proposal related to a problem? Please describe.
Syscalls run on fixed-sized privilege elevation stacks. There is a hard limit on how much stack space a system call can use because of this. We don't have good data on how much stack syscalls actually use.

Describe the solution you'd like
I'd like to be able to use CONFIG_STACK_USAGE to be able to generate a report, for every API exposed with __syscall, the upper bound on stack usage. Outliers that exceed the default privilege stack size should be flagged as issues.

This usage data must be from the syscall perspective; the measurements have to start from the syscall trap handler, through the verification and marshalling functions. We could probably get by with starting measurements at each mrsh function for every syscall; trap handler overhead would be a constant value added to the result.

@andrewboie andrewboie added Enhancement Changes/Updates/Additions to existing features area: Memory Management area: Memory Protection labels Jul 27, 2020
@nashif
Copy link
Member

nashif commented Jul 27, 2020

you mean CONFIG_STACK_USAGE i guess

@andrewboie
Copy link
Contributor Author

you mean CONFIG_STACK_USAGE i guess

yes, derp

@nashif nashif added the Good first issue Good for a first time contributor to take label Aug 12, 2020
@praton1729
Copy link

praton1729 commented May 18, 2023

Hi guys, I would like to work on this. Does the zephyr roadmap still consider this a required feature?

@zephyrbot zephyrbot added the Needs review This PR needs attention from Zephyr's maintainers label Feb 8, 2024
@nashif nashif removed the Needs review This PR needs attention from Zephyr's maintainers label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Memory Management area: Memory Protection Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take
Projects
None yet
Development

No branches or pull requests

5 participants