Skip to content

RFC SKAS4

Jeff Dike linux-um 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9SKAS4 - Fix x86_64 arch_copy_threadinclude/asm-um/processor-x86_64.h+2 -10 replies
2/9SKAS4 - Macroize stub system call execution looparch/um/sys-i386/stub.S arch/um/sys-x86_64/stub.S+75 -1010 replies
3/9SKAS4 - Host SIGSEGV siginfo_t extensionsarch/x86/mm/fault_32.c arch/x86/mm/fault_64.c include/asm-generic/siginfo.h +3 more+27 -10 replies
4/9SKAS4 - Guest siginfo_t supportarch/um/os-Linux/skas/process.c+120 -10 replies
5/9SKAS4 - start_up.c preparationarch/um/include/os.h arch/um/os-Linux/start_up.c+48 -410 replies
6/9SKAS4 - Host get_mm and switch_mmarch/um/include/skas_ptrace.h arch/um/kernel/ptrace.c arch/um/os-Linux/skas/process.c +17 more+492 -110 replies
7/9SKAS4 - stub management preparationarch/um/os-Linux/skas/mem.c+85 -770 replies
8/9SKAS4 - rename new_mmarch/um/include/skas/skas.h arch/um/kernel/skas/mmu.c arch/um/kernel/skas/process.c +1 more+4 -40 replies
9/9SKAS4 - Guest get_mm and switch_mm supportarch/um/include/skas/mm_id.h arch/um/include/skas/skas.h arch/um/kernel/reboot.c +9 more+427 -161 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [uml-devel] [RFC PATCH 0/9] SKAS4

These patches implement host and guest SKAS4 support for both 32- and 64-bit x86.

I think the new interfaces here are much more acceptable, so I'm going to push this to mainline.

What's new:
two new system calls -
new_mm - creates a new address space and returns a file
descriptor referencing it
switch_mm - moves the calling process to the address space
referenced by the file descriptor passed to it
/proc/<pid>/mm - opening this gives you a file descriptor
referencing the address space occupied by the given pid - this descriptor can be given to switch_mm just as a new_mm descriptor can

siginfo_t extensions - siginfo_t always contained the faulting
address in the SIGSEGV case. However, for it to be useful to UML, it needs the CPU trap number and error code. There already was conditional support for the trap number, which x86 didn't implement. This is enabled, and support for passing out the error code is added.

How this compares to skas3:

Creating a new address space:
skas3 - open /proc/mm
skas4 - new_mm()

Remapping pages within another address space
skas3 - write a structure desribing the change to a /proc/mm
descriptor
skas4 - switch_mm to the address space, run the necessary system
calls directly, switch_mm back to the UML kernel address space

Getting page fault information from a process
skas3 - PTRACE_FAULTINFO
skas4 - PTRACE_GETSIGINFO

This patchset contains 9 patches. Four of them contain the siginfo extension, guest siginfo support, host new_mm/switch_mm support, and guest new_mm/switch_mm support. The rest are preparation patches which shouldn't change anything functionally, but which make the four functional patches smaller and easier to read.

These are against 2.6.24-rc7. Build both host and guest from the same tree. I will be tweaking the interfaces in incompatible ways, so if you play with future versions of this patchset, throw this one out. Definitely don't try to boot a guest built from one version on a host built from another. It will work, but likely you'll get skas0, as there will likely be some interface change which causes the host skas4 checks to fail.

This is very experimental at this point. Don't let it near anything resembling a production system.

Jeff

Signature · 11 lines
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel