Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Dec 25, 2025

Implements OpenBSD-style pledge(2) for UKL applications:

  • Add ukl_pledge field to task_struct (sched.h)
  • Create ukl_pledge.h with 33 pledge bit definitions
  • Implement sys_ukl_pledge syscall (IR and Depth format of the Intel RealSense torvalds/linux#451)
  • Add documentation in Documentation/ukl/ukl.rst
  • Add test program in samples/ukl/pledge_test.c
  • First pledge() sets initial restrictions
  • Subsequent calls can only REDUCE abilities, never increase
  • Returns -EPERM on escalation attempt
  • Returns -EINVAL if PLEDGE_NEVER bit is set

Implements OpenBSD-style pledge(2) for UKL applications:
- Add ukl_pledge field to task_struct (sched.h)
- Create ukl_pledge.h with 33 pledge bit definitions
- Implement sys_ukl_pledge syscall (torvalds#451)
- Add documentation in Documentation/ukl/ukl.rst
- Add test program in samples/ukl/pledge_test.c

Inspired by Nanos unikernel implementation.
Phase 1: Storage and basic syscall (no enforcement yet).

Security guarantees:
- First pledge() sets initial restrictions
- Subsequent calls can only REDUCE abilities, never increase
- Returns -EPERM on escalation attempt
- Returns -EINVAL if PLEDGE_NEVER bit is set
@ghost ghost closed this Dec 25, 2025
@ghost ghost deleted the ukl-pledge branch December 25, 2025 17:42
@ghost ghost restored the ukl-pledge branch December 25, 2025 17:42
This pull request was closed.
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.

0 participants