um: Rework uaccess code
Rework UML's uaccess code to reuse as much as possible from asm-generic/uaccess.c. Signed-off-by: Richard Weinberger <richard@nod.at>
这个提交包含在:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <linux/string.h>
|
||||
#include <linux/in6.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
/*
|
||||
* computes the checksum of a memory block at buff, length len,
|
||||
|
@@ -200,8 +200,6 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
typedef struct user_i387_struct elf_fpregset_t;
|
||||
|
||||
#define task_pt_regs(t) (&(t)->thread.regs)
|
||||
|
||||
struct task_struct;
|
||||
|
||||
extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
|
||||
|
@@ -28,6 +28,8 @@ static inline void rep_nop(void)
|
||||
#define cpu_relax() rep_nop()
|
||||
#define cpu_relax_lowlatency() cpu_relax()
|
||||
|
||||
#define task_pt_regs(t) (&(t)->thread.regs)
|
||||
|
||||
#include <asm/processor-generic.h>
|
||||
|
||||
#endif
|
||||
|
@@ -7,4 +7,12 @@ extern int host_gdt_entry_tls_min;
|
||||
#define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min
|
||||
#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
|
||||
|
||||
typedef struct {
|
||||
unsigned long seg;
|
||||
} mm_segment_t;
|
||||
|
||||
#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
|
||||
#define KERNEL_DS MAKE_MM_SEG(~0UL)
|
||||
#define USER_DS MAKE_MM_SEG(TASK_SIZE)
|
||||
|
||||
#endif
|
||||
|
在新工单中引用
屏蔽一个用户