From: Diego Nieto Cid <[email protected]>

Hi,

Here is V1 of the previously sent patches to allow raising
task and thread priorities if the caller is the privileged
user.

I added the max_priority field to the task structure and
modified `task_priority` to honor the setting returning
KERN_NO_ACCESS when trying to go lower than it.

I also added the RPC `task_max_priority`, named after
the existing `thread_max_priority`, that sets the
max_priority of a task and optionally the priority and
current threads max_priority and priority.

The tests intend to document how these RPC are meant to
be used. They try to cover inheritance and unprivileged
and privileged usage.

When the patch gets more mature I'll dedicate some time
to updating the GNU Mach manual.

I also still need to lookup some info about the function
`boot_script_task_create` which Samuel mentioned to be
used to drop from SYSTEM to USER priorities.

And there is still an issue with the mapping of the user
space range (-20..20) to kernel space range (5..45) since
5 is lower than SYSTEM priority (6). [1]

Regards,
Diego


[1] https://sourceware.org/cgit/glibc/tree/ChangeLog.old/ChangeLog.18#n40265

-- 
2.53.0


Reply via email to