[GH-ISSUE #5122] Change the oom_score_adj for a sandbox #2888

Closed
opened 2026-05-05 09:32:49 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @rusty-snake on GitHub (Apr 29, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5122

Describe the solution you'd like

choom 123

in the profile will write 123 into /proc/<pid>/oom_score_adj

Additional context

  • man 1 choom and man 5 proc
  • This should be done unprivileged because writing negative numbers is a privileged task.
Originally created by @rusty-snake on GitHub (Apr 29, 2022). Original GitHub issue: https://github.com/netblue30/firejail/issues/5122 ### Describe the solution you'd like ``` choom 123 ``` in the profile will write `123` into `/proc/<pid>/oom_score_adj` ### Additional context - `man 1 choom` and `man 5 proc` - This should be done unprivileged because writing negative numbers is a privileged task.
gitea-mirror 2026-05-05 09:32:49 -06:00
Author
Owner

@reinerh commented on GitHub (Apr 30, 2022):

I like the idea!

* This should be done unprivileged because writing negative numbers is a privileged task.

(except the jail is started by root, similar to --nice)

<!-- gh-comment-id:1114024020 --> @reinerh commented on GitHub (Apr 30, 2022): I like the idea! > * This should be done unprivileged because writing negative numbers is a privileged task. (except the jail is started by root, similar to `--nice`)
Author
Owner

@netblue30 commented on GitHub (May 20, 2022):

Very good idea, try it out!

<!-- gh-comment-id:1132828102 --> @netblue30 commented on GitHub (May 20, 2022): Very good idea, try it out!
Author
Owner

@rusty-snake commented on GitHub (May 20, 2022):

undefined reference to `oom_set'

@netblue30 looks like you forgot to commit oom_set.

Shell completions and vim syntax files need to be updated as well. And a profile command would be nice too.

<!-- gh-comment-id:1132871916 --> @rusty-snake commented on GitHub (May 20, 2022): > undefined reference to `oom_set' @netblue30 looks like you forgot to commit `oom_set`. Shell completions and vim syntax files need to be updated as well. And a profile command would be nice too.
Author
Owner

@netblue30 commented on GitHub (May 20, 2022):

Fixed now, I forgot to check in a new file

<!-- gh-comment-id:1133006388 --> @netblue30 commented on GitHub (May 20, 2022): Fixed now, I forgot to check in a new file
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2888
No description provided.