IO Protection
-
rverma
RE:IO Protection
You will have to create an IO Map which is associated with the context. kernel can mask the prohibited IO operations. So when ever an application does IO request, it has to be routed through kernel, and kernel will check for the IO MAP and allows/disallows the access to IO. I hope it helps.
-
Dangamoose
RE:IO Protection
Read the Intel manual 3 on ia-32 processors under Task Management.
Dangamoose
Dangamoose
-
knicos
RE:IO Protection
You have to modify the IOPL bits in the EFLAGS register to restrict user access to opcodes (eg in, out, ...)
-
Mius
RE:IO Protection
But, can i allow a process to use only a few ports, and not restrict all the accesses to the ports?
(sorry for my very bad English)
(sorry for my very bad English)
RE:IO Protection
no, thats what the IO permissions bitmap is for in the TSS. if you use software switching, then the answer is, no.
-- Stu --
-
carbonBased
RE:IO Protection
No, Linux uses TSS based task switching.
What you might be thinking of (and I'm not sure if Linux does this) is a hybrid between software and hardware task switching.
Essentially, there are only two TSSs in use, ever... to switch tasks, inside your timer interrupt, you copy the appropriate data into the TSS that's not in use and jump to it.
Alternatively, you can have your timer interrupt in a task gate, and change the data in the TSS that it will return to upon an iret.
These are crude explainations, I realize... I'm fairly certain both methods work, but I haven't yet implemented either. I'm currently using straight TSS based multitasking, but am considering a switch very soon... at the very least, they both afford me more then 8192 possible tasks/threads.
Cheers,
Jeff
What you might be thinking of (and I'm not sure if Linux does this) is a hybrid between software and hardware task switching.
Essentially, there are only two TSSs in use, ever... to switch tasks, inside your timer interrupt, you copy the appropriate data into the TSS that's not in use and jump to it.
Alternatively, you can have your timer interrupt in a task gate, and change the data in the TSS that it will return to upon an iret.
These are crude explainations, I realize... I'm fairly certain both methods work, but I haven't yet implemented either. I'm currently using straight TSS based multitasking, but am considering a switch very soon... at the very least, they both afford me more then 8192 possible tasks/threads.
Cheers,
Jeff
RE:IO Protection
im sure linux uses software switching to save/load state, rather than TSS.
-- Stu --
