Ryan Finnie wrote: > sysdep-i386/skas_ptrace.h and sysdep-x86_64/skas_ptrace.h are nearly > identical, so I can't figure out why ptrace_faultinfo and ptrace_ldt are > being defined in the first place. Looks like they were added to include/asm-um/ptrace-x86_64.h to solve a disparity in x86_64 that the x86 merge fixed. Removing them let skas_ptrace.h define them, as in i386. So here we go, attached is an updated version. I also changed CONFIG_PROC_MM_BROWSABLE to depend on CONFIG_PROC_MM. Again, the i386 host and guest build and test properly, but I have only tested building x86_64 host and guest using defconfig. They build correctly, but I haven't test booted them. (I have x86_64 hardware, but don't have a guest userland handy to test with.) Please give it a spin and let me know how it works. Oh, and let me remind the world: I am not really a C programmer, let alone a kernel programmer. It's quite possible this patch will eat your dog. Hopefully someone like Jeff can chime in Monday and let me know that I did a horrible job porting the patch. RF arch/um/sys-i386/ldt.c | 2 arch/x86/Kconfig | 21 ++ arch/x86/ia32/ptrace32.c | 68 +++++++ arch/x86/ia32/sys_ia32.c | 16 + arch/x86/kernel/ldt_32.c | 58 +++--- arch/x86/kernel/ldt_64.c | 55 +++-- arch/x86/kernel/ptrace_32.c | 61 ++++++ arch/x86/kernel/ptrace_64.c | 70 +++++++ arch/x86/kernel/sys_i386_32.c | 27 ++ arch/x86/kernel/sys_x86_64.c | 15 + arch/x86/mm/Makefile_64 | 1 arch/x86/mm/proc_mm_64.c | 85 ++++++++ include/asm-um/compat.h | 9 include/asm-um/proc_mm_32.h | 1 include/asm-um/proc_mm_64.h | 1 include/asm-um/ptrace-x86_64.h | 1 include/asm-x86/desc_32.h | 3 include/asm-x86/desc_64.h | 3 include/asm-x86/mmu_context_32.h | 19 + include/asm-x86/mmu_context_64.h | 20 +- include/asm-x86/proc_mm_32.h | 18 + include/asm-x86/proc_mm_64.h | 58 ++++++ include/asm-x86/ptrace-abi.h | 6 include/asm-x86/ptrace.h | 65 ++++++ include/linux/mm.h | 19 + include/linux/proc_mm.h | 110 +++++++++++ mm/Makefile | 5 mm/fremap.c | 5 mm/mmap.c | 17 - mm/mprotect.c | 20 +- mm/proc_mm-mod.c | 50 +++++ mm/proc_mm.c | 299 +++++++++++++++++++++++++++++++ 32 files changed, 1124 insertions(+), 84 deletions(-)