Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Fix the uintr_alt_stack() syscall #2

Open
wants to merge 3 commits into
base: uintr-next
Choose a base branch
from

Conversation

charles66820
Copy link

The stack base pointer address is use without adding the size of the stack and this cause some Segmentation fault or double free corruption when we use the alt stack.
With this pull request i change the base pointer address to the top pointer address.

sohilmeh and others added 3 commits October 13, 2022 16:28
The test suite currently covers:

1. SENDUIPI base IPC tests
2. UINTR Syscall unit tests
3. SENDUIPI instruction fault tests
4. A configurable IPC test to stress context switching
5. Stack adjust tests

Planning to add the following in the future:
1. More context switching tests
2. UIF related tests
3. uintr_wait() syscall tests
4. Kernel to user notification tests

<TODO: Clean code. Fix checkpatch issues.>

Signed-off-by: Gayatri Kammela <[email protected]>
Signed-off-by: Sohil Mehta <[email protected]>
Modify the uintr_alt_stack() syscall to add the size of the stack to the stack base address because the stack grows downwards from the top address.
Fix the stack pointer check by adding the stack size to the uintr_expected_sp for the basic alternate stack test.
@sthibaul
Copy link
Contributor

That would make it the uintr_alt_stack() interface coherent with sigaltstack, indeed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants