[uml-user] [RFC PATCH 4/11] SKAS4 - Work around compat PTRACE_GETSIGINFO bug

2008-02-05 Thread Jeff Dike
copy_siginfo_to_user correctly strips off the high bits of si->si_code before copying it to userspace. Unfortunately, ptrace32_siginfo calls copy_siginfo_to_user to put the siginfo into a temporary userspace buffer and counts on the high bits still being present so that it may initialize the u

[uml-user] [RFC PATCH 8/11] SKAS4 - stub management preparation

2008-02-05 Thread Jeff Dike
Tidy the existing stub code so that the skas4 code can be dropped in. diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index 484e68f..efda5e1 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c @@ -40,35 +40,69 @@ static unsigned long syscall_regs[MAX_R

[uml-user] [RFC PATCH 5/11] SKAS4 - start_up.c preparation

2008-02-05 Thread Jeff Dike
Tidy arch/um/os-Linux/start_up.c in preparation for host SKAS4 testing. There are now explicit variables for disabling any particular host capability. init_registers is moved out of the skas3 testing because it needs to happen every time, and the skas3 checks will become o

[uml-user] [RFC PATCH 7/11] SKAS4 - Host get_mm and switch_mm

2008-02-05 Thread Jeff Dike
This is the new_mm, switch_mm, and /proc//mm implementation for 32- and 64-bit x86 and UML, plus 32-bit support on 64-bit x86. diff --git a/arch/um/include/skas_ptrace.h b/arch/um/include/skas_ptrace.h index cd2327d..6b55c52 100644 --- a/arch/um/include/skas_ptrace.h +++ b/arch/um/include

[uml-user] [RFC PATCH 11/11] SKAS4 - Guest get_mm and switch_mm support

2008-02-05 Thread Jeff Dike
UML guest SKAS4 support. diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h index a5cdf95..90ee798 100644 --- a/arch/um/include/as-layout.h +++ b/arch/um/include/as-layout.h @@ -17,6 +17,7 @@ #define ASM_STUB_CODE (UML_CONFIG_TOP_ADDR - 2 * UM_KERN_PAGE_SIZE) #define ASM_STUB

[uml-user] [RFC PATCH 6/11] SKAS4 - Guest support for using PTRACE_GETSIGINFO

2008-02-05 Thread Jeff Dike
The nastiness in arch/um/include/siginfo_segv.h is defining the new siginfo_t structure in place of the old one, which requires using CPP to rename the old one out of the way. diff --git a/arch/um/include/siginfo_segv.h b/arch/um/include/siginfo_segv.h new file mode 100644 index 000..c000267 -

[uml-user] [RFC PATCH 3/11] SKAS4 - Host SIGSEGV siginfo_t extensions

2008-02-05 Thread Jeff Dike
Add CPU trap number and error code to siginfo_t in the SIGSEGV case for x86. diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index 6ea19c2..2f74adf 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c @@ -65,6 +65,8 @@ int copy_siginfo_to_user32(compat_

[uml-user] [RFC PATCH 1/11] SKAS4 - Fix x86_64 arch_copy_thread

2008-02-05 Thread Jeff Dike
Fix a bug which will be important later. x86_64 copy_thread needs to copy %fs from parent to child. diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index d946bf2..0528d9e 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h @@

[uml-user] [RFC PATCH 2/11] SKAS4 - Macroize stub system call execution loop

2008-02-05 Thread Jeff Dike
Extract the system call execution loop in the stubs into a macro A later patch will need this loop, so this makes it available. diff --git a/arch/um/sys-i386/stub.S b/arch/um/sys-i386/stub.S index e730772..890dc50 100644 --- a/arch/um/sys-i386/stub.S +++ b/arch/um/sys-i386/stub.S @@ -1,52 +1,45 @@

[uml-user] [RFC PATCH 9/11] SKAS4 - rename new_mm

2008-02-05 Thread Jeff Dike
UML already had a new_mm(). This is renamed to make_new_mm(). diff --git a/arch/um/include/skas/skas.h b/arch/um/include/skas/skas.h index d6cbb4f..061a362 100644 --- a/arch/um/include/skas/skas.h +++ b/arch/um/include/skas/skas.h @@ -17,7 +17,7 @@ extern int skas_needs_stub; extern int user_thr

[uml-user] [RFC PATCH 10/11] SKAS4 - Introduce STUB_ADDR

2008-02-05 Thread Jeff Dike
There were a number of repetitions of the calculation of an stub address in a process address space. This introduces STUB_ADDR to eliminate the common code. diff --git a/arch/um/include/skas/skas.h b/arch/um/include/skas/skas.h index 061a362..331f343 100644 --- a/arch/um/include/skas/skas.h +++ b