Hi,
Unlink wrote:i hope i am not causing any troubles here

I hope I'm not causing trouble here too

.
My comments below ignore virtual 8086 mode completely (in virtual 8086 mode there's different privileged instructions and some I/O port handling changes).
Unlink wrote:1- i want to know what instructions is allowed in ring 0 but not allowed in ring 3 ?
Intel's system programmers manual, section 4.9 "Privileged Instructions" has a list:
- LGDT
LLDT
LTR
LIDT
MOV (to and from control registers only)
MOV (to and from debug registers only)
LMSW
CLTS
INVD
WBINVD
INVLPG
HLT
RDMSR
WRMSR
RDPMC
RDTSC
Also, some instructions (like CLI and STI) are controlled by IOPL, just like instructions that access I/O ports (see below).
Unlink wrote:2- i also want to know which memory area is allowend for ring 0 and not ring 3 knowing that the memory model is pure segmentation with base 0 and limit 4 gb
Protection of memory areas is controlled by segmentation and paging, and nothing else.
Unlink wrote:3- for the ports what ports is allowed for ring 0 but not for ring 3, i know that this is controlled by IOBITMP in the TSS, but does linux & bsd prevent all IO for ring 3 process, if they do how to disable all io for ring 3, as i like to trace how things is made up in linux

Ring 0 can always access all I/O ports. Ring 3 may be able to access all of them or none of them, depending on how the OS sets IOPL (the "I/O Privilege Level" bits in EFLAGS). If IOPL is set to zero, ring 3 code may be granted access to individual I/O ports if the OS uses the IOBMP in the TSS.
I don't know what BSD and LInux do though...
Cheers,
Brendan