Add mutable functionality to the process VMAR

This commit is contained in:
Chen Chengjun
2025-03-17 10:53:56 +08:00
committed by Tate, Hongliang Tian
parent 248b24fb4e
commit 2a20f6b59a
15 changed files with 119 additions and 63 deletions

View File

@ -130,7 +130,7 @@ pub(super) fn read_linux_sched_attr_from_user(
) -> Result<LinuxSchedAttr> {
let type_size = mem::size_of::<LinuxSchedAttr>();
let space = CurrentUserSpace::new(ctx.task);
let space = ctx.user_space();
let mut attr = LinuxSchedAttr::default();
@ -160,7 +160,7 @@ pub(super) fn write_linux_sched_attr_to_user(
user_size: u32,
ctx: &Context,
) -> Result<()> {
let space = CurrentUserSpace::new(ctx.task);
let space = ctx.user_space();
attr.size = (mem::size_of::<LinuxSchedAttr>() as u32).min(user_size);