MCPcopy Create free account
hub / github.com/F-Stack/f-stack / linux_iopl

Function linux_iopl

freebsd/i386/linux/linux_machdep.c:382–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382int
383linux_iopl(struct thread *td, struct linux_iopl_args *args)
384{
385 int error;
386
387 if (args->level < 0 || args->level > 3)
388 return (EINVAL);
389 if ((error = priv_check(td, PRIV_IO)) != 0)
390 return (error);
391 if ((error = securelevel_gt(td->td_ucred, 0)) != 0)
392 return (error);
393 td->td_frame->tf_eflags = (td->td_frame->tf_eflags & ~PSL_IOPL) |
394 (args->level * (PSL_IOPL / 3));
395 return (0);
396}
397
398int
399linux_modify_ldt(struct thread *td, struct linux_modify_ldt_args *uap)

Callers

nothing calls this directly

Calls 2

priv_checkFunction · 0.50
securelevel_gtFunction · 0.50

Tested by

no test coverage detected