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

WIP: cocall #904

Closed
wants to merge 447 commits into from
Closed

WIP: cocall #904

wants to merge 447 commits into from

Conversation

trasz
Copy link
Contributor

@trasz trasz commented Jan 22, 2021

This pull request contains the cocall(2) and associated syscalls, built on top of the functionality in #902. This is not intended to be merged as-is, instead, it's intended to gather feedback about the design.

Some bits - eg the thread borrowing, and cocall_slow(2)/coaccept_slow(2) - are being actively worked on, and are expected to change quite significantly.

trasz and others added 28 commits July 14, 2022 10:13
The reason for this is to make the diffs easier to understand.
Use __has_feature(capabilities) for now. There's some argument they
should go under a config option when initially merged to dev.

For system calls, include stub ENOSYS implementations.
We should probably dial back the abstraction a bit here.
It confuses debugging and may be leading to failing tests .
Allow start to hold a capablity and construct one with vm_map_buildcap
before passing to vm_map_insert.
Add printfs for a couple failure cases that shouldn't happen.
I'm not entierly sure these shouldn't be panic calls instead.
Add the ability to run a test-specific function in a child process
re-execed with execve() or coexecve(). This will permit a test to fork
and (coexec with a child running the test-specific function.
Add colocation_coexec_child and colocation_exec_child which use
cheribsdtest_coexec_child() and colocation_exec_child() to create a
potentially colocated child. The child then uses procstat_getvmmap()
to determine that it does or does not (respectively) share an address
space.

The colocation_exec_child test currently assumes no opportunistic
colocation and may require updates if that is reenabled.
We don't support colocating static binaries (it would be possible
and maybe even a good idea to support position independent static
binaries, but we don't have a facility to build such things).  Failures
are confusing enable a uprint warning when rejecting such things, but
only when not doing opportunistic colocation.
This sets up a coaccepting child and makes a cocall into it.
The parent test runner and child exchange PIDs and validate that
they recieve them as expected.
Previously, on riscv64 it would die with:

panic: setup_scb:518: vm_map does not contain basep 0x0 (length 0x0, offset 0x35)
Conflicts resolved:
 - AT_CAPV collided with upstream additions.  Binary flagday for all
   capv aware programs!
 - unimpl syscall list collisions resolved
 - files lists merged (llvm14 support)
 - thread borrowing ast changes moved to ast_signal handler
@jrtc27
Copy link
Member

jrtc27 commented Oct 25, 2023

cocall gets built directly by Jenkins, we don't need this long-lived PR building it a second time. Any attempt to bring some or all of it into dev will require a clean rewritten branch anyway.

@jrtc27 jrtc27 closed this Oct 25, 2023
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.

7 participants