Results 1 to 1 of 1
Hi,
I am new to kernel programming. I am set out to remove the protection domain between the kernel and the user applications. For this I want to set privilege ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-05-2005 #1Just Joined!
- Join Date
- Nov 2005
- Posts
- 2
seting Local descriptor
Hi,
I am new to kernel programming. I am set out to remove the protection domain between the kernel and the user applications. For this I want to set privilege level of each descriptor to 0.
I am looking into the kernel code for finding where should I make changes. I came across some cryptic code for seting local descriptor table:
I have done assembly code previously, but am not able to understand following code. What does %%ax mean, what does rorl instruction do?
What does 2(%2) as an operand stand for? Is there any tutorial which explains this?
#define _set_tssldt_desc(n,addr,limit,type) \
__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
"movw %%ax,2(%2)\n\t" \
"rorl $16,%%eax\n\t" \
"movb %%al,4(%2)\n\t" \
"movb %4,5(%2)\n\t" \
"movb $0,6(%2)\n\t" \
"movb %%ah,7(%2)\n\t" \
"rorl $16,%%eax" \
: "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type))
Any help in this direction will be appreciated.
About my main task, I am removing protection domain, so that we can have system calls as light as procedure calls. Doing this as a class project. Is there any other better way in which I can achieve the solution?
Thanks in advance,
Purav


Reply With Quote
