Skip to contentSkip to conversation

skas3 (almost) works on amd64?

uml-devel Antoine Martin 2 participants 4 messages Dec 18, 2005 – Dec 19, 2005 4 messages not in the archive User-mode Linux (UML)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1113830263.11747.3.camel@cobra

A message that is not in the archive (sent off-list or not yet received): 1113841384.12075.6.camel@localhost

A message that is not in the archive (sent off-list or not yet received): 1113844082.11747.33.camel@cobra

#4 lore raw

(..)

Quoted 2 lines
Quoted 1 line

I can't speak to how stable it was. I'm pretty sure I wasn't using Skas,

It isn't skas as the skas3 code hasn't been ported to x86_64 yet.

Or has it?
I've just removed mode=skas0 from the command line during testing and I was surprised to see this:
Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...missing Checking PROT_EXEC mmap in /dev/shm/...OK
Checking if syscall restart handling in host can be skipped...OK Checking for the skas3 patch in the host:
- /proc/mm...found
- PTRACE_FAULTINFO...found
- PTRACE_LDT...found
UML running in SKAS3 mode
??????
The host was patched with the skas patch (even though it is a 64bit kernel) as the patch does not seem to interfere and it clearly provides something useful!

Now it doesn't quite work for me, but it is close enough that I feel it is well worth investigating (skas3 being much faster - even though skas0 is pretty good - skas3 stills has the advantage)

Here are some test results:
* with kernel32-2.6.15-rc5:
it gets stuck right after printing "SKAS3 mode", here is the full strace (not big 16KB):
http://uml.nagafix.co.uk/logs/2.6.15-rc5-skas3.strace
the last few lines are:
sigaltstack({ss_sp=0xa0464000, ss_flags=0x3ffc, ss_size=11548988665867022973}, NULL) = 0 rt_sigaction(SIGUSR1, {0x8000000a0023390, [], 0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [USR1], NULL, 8) = 0
getpid() = 22917
kill(22917, SIGUSR1) = 0
--- SIGUSR1 (User defined signal 1) @ 0 (0) --- rt_sigprocmask(SIG_UNBLOCK, [USR1], [USR1], 8) = 0 sigaltstack({ss_sp=0x200000000, ss_flags=0, ss_size=6979621237}, NULL) = 0
getpid() = 22917
pause(
--- It hangs there until I ^C it.

* with kernel32-2.6.14.4-bs3 and kernel32-2.6.13-bs3 (and others):
as above but the strace is different!?, here it is (76KB)
http://uml.nagafix.co.uk/logs/2.6.14.4-bs3.strace
difference is that this is similar to what was reported a while back:
lots of these:
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [], [ALRM VTALRM IO], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, NULL, [ALRM VTALRM IO], 8) = 0 And at the end:
kill(23087, SIGKILL) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
ptrace(PTRACE_KILL, 23087, 0x8000, 0xa001ab33) = 0 Segmentation fault

* with 2.4.32-bs2:
Apart from this warning near the top:
Checking for /dev/anon on the host...Not available (open failed with errno 2)
It spins (consuming CPU) after mounting root (or mounting devfs if enabled) with:
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM IO], [ALRM VTALRM IO], 8) = 0 Interestingly similar to 2.6.14/2.6.13 above, log here (a lot bigger:
260MB uncompressed / 220KB compressed):
http://uml.nagafix.co.uk/logs/2.4.32-bs2.strace.bz2

* with 2.6.15-rc1:
As with 2.4.32, it spins after mounting root, but seems to be on this:
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(23866, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSEGV}], WSTOPPED) = 23866
ptrace(PTRACE_GETREGS, 23866, 0, 0xa07af9d4) = 0 ptrace(PTRACE_GETFPXREGS, 23866, 0, 0xa07afbcc) = 0 ptrace(0x34 /* PTRACE_??? */, 23866, 0, 0xa07afdcc) = 0 gettimeofday({1021846869037274, 11531684934252935416}, NULL) = 0 write(4, "137333\t 1134874842.237917 Alloc"..., 49) = 49 ptrace(PTRACE_SETREGS, 23866, 0, 0xa07af9d4) = 0 ptrace(PTRACE_SETFPXREGS, 23866, 0, 0xa07afbcc) = 0 ptrace(PTRACE_SYSCALL, 23866, 0, SIG_0) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
full log here (700MB/840KB)

The kernels were built using vanilla gcc-3.4.4, and the tests were repeated on 2 separate platforms (gentoo 2005.1 and FC4) - selinux was disabled for the tests.

Antoine

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#5 lore raw
Quoted 8 lines · Antoine Martin

(..)

Quoted 4 lines
Quoted 2 lines

I can't speak to how stable it was. I'm pretty sure I wasn't using Skas,

It isn't skas as the skas3 code hasn't been ported to x86_64 yet.

Or has it?

Wait a moment - I remember informing somebody (probably you) that all 32-bit Slackware-based root_fs work in SKAS3 mode very well on 64-bit hosts.

And you saying "yes it works, I know this".

SKAS64 support is implemented in the SKAS patch, but IIRC not in the guest kernel - there are just a few things to fix up (for instance using /proc/mm64), but I gave up as I hadn't found a solution to SKAS32-on-64 problems, and the changes were boring to do, and impossible to get right without a testing possibility.

Actually, there is even some information I saved on a bug interfering here - i.e. a description from Bodo Stroesser.

I've not found the time to do my homeworks on the subject (aka studying the SYSENTER instruction) and then go studying that description.

Signature · 23 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#6 lore raw
Quoted 1 line

And you saying "yes it works, I know this".

I can't remember! And I thought only my short term memory was bad... ;)

Quoted 5 lines

SKAS64 support is implemented in the SKAS patch, but IIRC not in the guest kernel - there are just a few things to fix up (for instance using /proc/mm64), but I gave up as I hadn't found a solution to SKAS32-on-64 problems, and the changes were boring to do, and impossible to get right without a testing possibility.

I suppose this isn't something I can help with?
That's a shame because I get the impression that skas3 is still much faster than skas0... no hard figures though.

Antoine

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#7 lore raw
Quoted 11 lines · Antoine Martin
Quoted 1 line

And you saying "yes it works, I know this".

I can't remember! And I thought only my short term memory was bad... ;)

Quoted 5 lines

SKAS64 support is implemented in the SKAS patch, but IIRC not in the guest kernel - there are just a few things to fix up (for instance using /proc/mm64), but I gave up as I hadn't found a solution to SKAS32-on-64 problems, and the changes were boring to do, and impossible to get right without a testing possibility.

I suppose this isn't something I can help with?

I have the hardware, but I should go back coding on this.

Given that we have _always_ some urgent bug to diagnose, and that I already have my toy project (finishing and getting merged Ye Olde VMe Patche from Ingo Molnar)... it takes time.

Especially, I spend lots of time with emails - more than coding. So I'll go back there.

Quoted 4 lines

That's a shame because I get the impression that skas3 is still much faster than skas0... no hard figures though.

Antoine

Signature · 23 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel