| 380 | } |
| 381 | |
| 382 | int |
| 383 | linux_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 | |
| 398 | int |
| 399 | linux_modify_ldt(struct thread *td, struct linux_modify_ldt_args *uap) |
nothing calls this directly
no test coverage detected