Displaying 14 results from an estimated 14 matches for "ldt_info".
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...-2.6.13/arch/i386/kernel/ldt.c 2005-08-08 13:53:28.000000000 -0700
@@ -177,7 +177,7 @@
static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
{
struct mm_struct * mm = current->mm;
- __u32 entry_1, entry_2, *lp;
+ __u32 entry_1, entry_2;
int error;
struct user_desc ldt_info;
@@ -205,8 +205,6 @@
goto out_unlock;
}
- lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
-
/* Allow LDTs to be cleared by the user. */
if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
if (oldmode || LDT_empty(&ldt_info)) {...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...-2.6.13/arch/i386/kernel/ldt.c 2005-08-08 13:53:28.000000000 -0700
@@ -177,7 +177,7 @@
static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
{
struct mm_struct * mm = current->mm;
- __u32 entry_1, entry_2, *lp;
+ __u32 entry_1, entry_2;
int error;
struct user_desc ldt_info;
@@ -205,8 +205,6 @@
goto out_unlock;
}
- lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
-
/* Allow LDTs to be cleared by the user. */
if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
if (oldmode || LDT_empty(&ldt_info)) {...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...@ -176,10 +181,11 @@ static int read_default_ldt(void __user
static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
{
- struct mm_struct * mm = current->mm;
+ mm_context_t *pc = ¤t->mm->context;
__u32 entry_1, entry_2;
int error;
struct user_desc ldt_info;
+ int page_number;
error = -EINVAL;
if (bytecount != sizeof(ldt_info))
@@ -198,9 +204,11 @@ static int write_ldt(void __user * ptr,
goto out;
}
- down(&mm->context.sem);
- if (ldt_info.entry_number >= mm->context.size) {
- error = alloc_ldt(¤t->mm->cont...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...@ -176,10 +181,11 @@ static int read_default_ldt(void __user
static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
{
- struct mm_struct * mm = current->mm;
+ mm_context_t *pc = ¤t->mm->context;
__u32 entry_1, entry_2;
int error;
struct user_desc ldt_info;
+ int page_number;
error = -EINVAL;
if (bytecount != sizeof(ldt_info))
@@ -198,9 +204,11 @@ static int write_ldt(void __user * ptr,
goto out;
}
- down(&mm->context.sem);
- if (ldt_info.entry_number >= mm->context.size) {
- error = alloc_ldt(¤t->mm->cont...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...r_LDT();
- if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
- vfree(mm->context.ldt);
- else
- kfree(mm->context.ldt);
- mm->context.size = 0;
- }
}
static int read_ldt(void __user * ptr, unsigned long bytecount)
@@ -200,7 +179,8 @@
down(&mm->context.sem);
if (ldt_info.entry_number >= mm->context.size) {
- error = alloc_ldt(¤t->mm->context, ldt_info.entry_number+1, 1);
+ error = alloc_ldt(¤t->mm->context, mm->context.size,
+ ldt_info.entry_number+1, 1);
if (error < 0)
goto out_unlock;
}
Index: linux-2.6.1...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...r_LDT();
- if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
- vfree(mm->context.ldt);
- else
- kfree(mm->context.ldt);
- mm->context.size = 0;
- }
}
static int read_ldt(void __user * ptr, unsigned long bytecount)
@@ -200,7 +179,8 @@
down(&mm->context.sem);
if (ldt_info.entry_number >= mm->context.size) {
- error = alloc_ldt(¤t->mm->context, ldt_info.entry_number+1, 1);
+ error = alloc_ldt(¤t->mm->context, mm->context.size,
+ ldt_info.entry_number+1, 1);
if (error < 0)
goto out_unlock;
}
Index: linux-2.6.1...
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
...nlikely
used, but accounting is done in page sizes. Asking to read_ldt with
bytcount of PAGE_SIZE could give some uninitialzed data back to user.
Did I miss the spot where this is always zero-filled?
> @@ -166,6 +167,7 @@
> __u32 entry_1, entry_2;
> int error;
> struct user_desc ldt_info;
> + int page_number;
>
> error = -EINVAL;
> if (bytecount != sizeof(ldt_info))
> @@ -184,10 +186,11 @@
> goto out;
> }
>
> + page_number = ldt_info.entry_number / LDT_ENTRIES_PER_PAGE;
> down(&mm->context.sem);
> - if (ldt_info.entry_number &...
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
...nlikely
used, but accounting is done in page sizes. Asking to read_ldt with
bytcount of PAGE_SIZE could give some uninitialzed data back to user.
Did I miss the spot where this is always zero-filled?
> @@ -166,6 +167,7 @@
> __u32 entry_1, entry_2;
> int error;
> struct user_desc ldt_info;
> + int page_number;
>
> error = -EINVAL;
> if (bytecount != sizeof(ldt_info))
> @@ -184,10 +186,11 @@
> goto out;
> }
>
> + page_number = ldt_info.entry_number / LDT_ENTRIES_PER_PAGE;
> down(&mm->context.sem);
> - if (ldt_info.entry_number &...
2007 Apr 18
2
[PATCH 1/14] i386 / Make write ldt return error code
...=====================================
--- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-09 18:19:37.000000000 -0700
+++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-09 18:22:56.000000000 -0700
@@ -221,8 +221,7 @@
/* Install the new entry ... */
install:
- write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2);
- error = 0;
+ error = write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2);
out_unlock:
up(&mm->context.sem);
2007 Apr 18
2
[PATCH 1/14] i386 / Make write ldt return error code
...=====================================
--- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-09 18:19:37.000000000 -0700
+++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-09 18:22:56.000000000 -0700
@@ -221,8 +221,7 @@
/* Install the new entry ... */
install:
- write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2);
- error = 0;
+ error = write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2);
out_unlock:
up(&mm->context.sem);
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi,
this is a series of patches that unify the struct desc_struct and friends
across x86_64 and i386. As usual, it provides paravirt capabilities as a
side-effect for x86_64.
I consider the main goal, namely, of unifying the desc_struct, an ongoing
effort, being this the beginning. A lot of old code has to be touched to
accomplish that.
I don't consider this patch ready for inclusion.
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi,
this is a series of patches that unify the struct desc_struct and friends
across x86_64 and i386. As usual, it provides paravirt capabilities as a
side-effect for x86_64.
I consider the main goal, namely, of unifying the desc_struct, an ongoing
effort, being this the beginning. A lot of old code has to be touched to
accomplish that.
I don't consider this patch ready for inclusion.
2007 Apr 18
3
[PATCH] abstract out bits of ldt.c
Chris Wright wrote:
>* Zachary Amsden (zach@vmware.com) wrote:
>
>
>>Does Xen assume page aligned descriptor tables? I assume from this
>>
>>
>
>Yes.
>
>
>
>>patch and snippets I have gathered from others, that is a yes, and other
>>things here imply that DT pages are not shadowed. If so, Xen itself
>>must have live segments
2007 Apr 18
3
[PATCH] abstract out bits of ldt.c
Chris Wright wrote:
>* Zachary Amsden (zach@vmware.com) wrote:
>
>
>>Does Xen assume page aligned descriptor tables? I assume from this
>>
>>
>
>Yes.
>
>
>
>>patch and snippets I have gathered from others, that is a yes, and other
>>things here imply that DT pages are not shadowed. If so, Xen itself
>>must have live segments