Displaying 20 results from an estimated 41 matches for "user_desc".
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...ne GET_WRITABLE(desc) (((desc)->b >> 9) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
-
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
@@ -932,16 +912,7 @@
memset(&info, 0, sizeof(info));
desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
-
- info.entry_number = idx;
- info.base_addr = GET_BASE(desc);
- info.limit = GET_LIMIT(desc);
- info.seg_32bit = GET_32BIT(desc...
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...ne GET_WRITABLE(desc) (((desc)->b >> 9) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
-
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
@@ -932,16 +912,7 @@
memset(&info, 0, sizeof(info));
desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
-
- info.entry_number = idx;
- info.base_addr = GET_BASE(desc);
- info.limit = GET_LIMIT(desc);
- info.seg_32bit = GET_32BIT(desc...
2007 Apr 18
2
[PATCH 16/21] i386 Eliminate duplicate segment macros
...ne GET_WRITABLE(desc) (((desc)->b >> 9) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
-
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
@@ -913,19 +893,8 @@ asmlinkage int sys_get_thread_area(struc
return -EINVAL;
memset(&info, 0, sizeof(info));
-
desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
-
- info.entry_number = idx;
- info.base_addr = GET_BASE(desc);
- i...
2007 Apr 18
2
[PATCH 16/21] i386 Eliminate duplicate segment macros
...ne GET_WRITABLE(desc) (((desc)->b >> 9) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
-
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
@@ -913,19 +893,8 @@ asmlinkage int sys_get_thread_area(struc
return -EINVAL;
memset(&info, 0, sizeof(info));
-
desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
-
- info.entry_number = idx;
- info.base_addr = GET_BASE(desc);
- i...
2007 Apr 18
0
[PATCH 10/12] yet-another-redundant-accessor
...ne GET_WRITABLE(desc) (((desc)->b >> 9) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
-
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
@@ -934,7 +914,7 @@
desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
info.entry_number = idx;
- info.base_addr = GET_BASE(desc);
+ info.base_addr = get_desc_base(desc);
info.limit = GET_LIMIT(desc);
info.seg_32bit = GET_32BIT(desc)...
2007 Apr 18
0
[PATCH 10/12] yet-another-redundant-accessor
...ne GET_WRITABLE(desc) (((desc)->b >> 9) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
-
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
@@ -934,7 +914,7 @@
desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
info.entry_number = idx;
- info.base_addr = GET_BASE(desc);
+ info.base_addr = get_desc_base(desc);
info.limit = GET_LIMIT(desc);
info.seg_32bit = GET_32BIT(desc)...
2013 Jul 09
2
[LLVMdev] Error building compiler-rt
...nside sched.h, clone is indeed declared with four arguments, but, interestingly, the man page for clone provides this prototype:
#include <sched.h>
int clone(int (*fn)(void *), void *child_stack,
int flags, void *arg, ...
/* pid_t *pid, struct user_desc *tls, pid_t *ctid */ );
I'm running RedHat EL 2.6.9-89.ELlargesmp without root privileges.
Is this a bug in LLVM? Do I just have an old version of clone that's not supported by LLVM? I can try just removing the last three arguments from the compiler-rt source, but is that the best solut...
2013 Jul 09
0
[LLVMdev] Error building compiler-rt
...nside sched.h, clone is indeed declared with four arguments, but, interestingly, the man page for clone provides this prototype:
#include <sched.h>
int clone(int (*fn)(void *), void *child_stack,
int flags, void *arg, ...
/* pid_t *pid, struct user_desc *tls, pid_t *ctid */ );
I'm running RedHat EL 2.6.9-89.ELlargesmp without root privileges.
Is this a bug in LLVM? Do I just have an old version of clone that's not supported by LLVM? I can try just removing the last three arguments from the compiler-rt source, but is that the best solut...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...censed under the GPL.
*/
#include <stdio.h>
#include <signal.h>
#include <asm/ldt.h>
#include <asm/segment.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/mman.h>
#define __KERNEL__
#include <asm/page.h>
void main(void)
{
struct user_desc desc;
char *code;
unsigned long long tsc;
code = (char *)mmap(0, 8192, PROT_EXEC|PROT_READ|PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
desc.entry_number = 0;
desc.base_addr = code;
desc.limit = 1;
desc.se...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...censed under the GPL.
*/
#include <stdio.h>
#include <signal.h>
#include <asm/ldt.h>
#include <asm/segment.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/mman.h>
#define __KERNEL__
#include <asm/page.h>
void main(void)
{
struct user_desc desc;
char *code;
unsigned long long tsc;
code = (char *)mmap(0, 8192, PROT_EXEC|PROT_READ|PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
desc.entry_number = 0;
desc.base_addr = code;
desc.limit = 1;
desc.se...
2013 Jul 17
1
[LLVMdev] Error building compiler-rt
...an page for clone provides this prototype:****
>
> ** **
>
> #include <sched.h>****
>
> ** **
>
> int clone(int (*fn)(void *), void *child_stack,****
>
> int flags, void *arg, ...****
>
> /* pid_t *pid, struct user_desc *tls, pid_t *ctid */ );**
> **
>
> ** **
>
> I’m running RedHat EL 2.6.9-89.ELlargesmp without root privileges.****
>
> ** **
>
> Is this a bug in LLVM? Do I just have an old version of clone that’s not
> supported by LLVM? I can try just removing the last three argu...
2007 Apr 18
0
[PATCH 17/21] i386 Ldt cleanups 1
...rk/include/asm-i386/ldt.h 2005-11-04 18:22:07.000000000 -0800
@@ -10,6 +10,8 @@
#define LDT_ENTRIES 8192
/* The size of each LDT entry. */
#define LDT_ENTRY_SIZE 8
+/* The number of LDT entries per page */
+#define LDT_ENTRIES_PER_PAGE (PAGE_SIZE / LDT_ENTRY_SIZE)
#ifndef __ASSEMBLY__
struct user_desc {
2007 Apr 18
0
[PATCH 17/21] i386 Ldt cleanups 1
...rk/include/asm-i386/ldt.h 2005-11-04 18:22:07.000000000 -0800
@@ -10,6 +10,8 @@
#define LDT_ENTRIES 8192
/* The size of each LDT entry. */
#define LDT_ENTRY_SIZE 8
+/* The number of LDT entries per page */
+#define LDT_ENTRIES_PER_PAGE (PAGE_SIZE / LDT_ENTRY_SIZE)
#ifndef __ASSEMBLY__
struct user_desc {
2020 Apr 28
0
[PATCH v3 70/75] x86/head/64: Setup TSS early for secondary CPUs
...3 files changed, 18 insertions(+)
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
index 30e2a0e863b6..0777b100dc63 100644
--- a/arch/x86/include/asm/desc.h
+++ b/arch/x86/include/asm/desc.h
@@ -40,6 +40,8 @@ static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *in
desc->l = 0;
}
+extern unsigned char boot_gdt[];
+
extern struct desc_ptr idt_descr;
extern gate_desc idt_table[];
extern const struct desc_ptr debug_idt_descr;
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index d83d59c15548..30a6d09fd9d0 100644
--- a/arch/x86/k...
2013 Oct 22
0
[PATCH 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling
...hread.io_bitmap_max = 0;
- return -ENOMEM;
- }
- set_tsk_thread_flag(p, TIF_IO_BITMAP);
- }
-
- err = 0;
-
/*
* Set a new TLS for the child thread?
*/
- if (clone_flags & CLONE_SETTLS)
+ if (clone_flags & CLONE_SETTLS) {
+ int err;
err = do_set_thread_area(p, -1,
(struct user_desc __user *)childregs->si, 0);
-
- if (err && p->thread.io_bitmap_ptr) {
- kfree(p->thread.io_bitmap_ptr);
- p->thread.io_bitmap_max = 0;
+ if(err)
+ return err;
}
- return err;
+
+ return copy_io_bitmap(tsk, p);
}
void
diff --git a/arch/x86/kernel/process_64.c b/arch/x8...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...count) {
@@ -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...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...count) {
@@ -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...
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