From: Dan F. <ds...@gb...> - 2003-07-08 05:49:32
|
Howdy - I'm running Gentoo Linux 1.4rc4 with the latest version of all Gentoo tools and kernel version 2.4.20-gentoo-r5 (uname -r output) with the skas3 patch cleanly applied on a x86 box. In the host and UML kernel config file, CONFIG_PROC_MM=y is set. In the UML kernel config file, CONFIG_MODE_SKAS=y is set. /proc/mm does exist on the host system with (octal) 222 perms set. The UML kernel source tree (built in a separate directory, per instructions), is based on the plain vanilla 2.4.20 kernel along with uml-patch-2.4.20-6 applied, 'make config' (with ARCH=um) and the other normal steps done to build UML properly including making sure the built modules were put in the root_fs image via a loopback mount. UML utilities version is 20030605. I start a single UML instance (with no others running) with: ./linux eth0=mcast ubd0=../cow/root_fs_cow_r1,../root_fs/root_fs_slack81 umid=r1 It boots the UML kernel, and first line says it detects skas3 successfully and uses it. Normal looking messages - no errors seen. At the end is this: [...snipped for brevity - ask if you'd like to see the whole thing...] 0VFS: Mounted root (ext2 filesystem) readonly. Mounted devfs on /dev Kernel panic: switch_mm_skas - PTRACE_SWITCH_MM failed, errno = 1 In idle task - not syncing And it returns to the host shell prompt, not having started UML. What am I doing wrong? It works fine in tt mode, not at all with skas3 applied or enabled...so I know my setup is good. errno=1 is EPERM, isn't it? I get this error regardless of whether I run it as my unprivved user or as root. (Although, obviously, I prefer to run things non-root!) In the host kernel source file arch/i386/kernel/ptrace.c is this: case PTRACE_SWITCH_MM: { struct mm_struct *old = child->mm; struct mm_struct *new = proc_mm_get_mm(data); if(IS_ERR(new)){ ret = PTR_ERR(new); break; } atomic_inc(&new->mm_users); child->mm = new; child->active_mm = new; mmput(old); ret = 0; break; } ....so I know the skas3 patch applied there fine, and there really isn't much that could cause it to fail there? Since it doesn't complete the boot, can't fire up a debugger on it easily :( More than happy to apply any custom patches to the kernel for further debugging if desired - it's my laptop so I can reboot at will. It's also a reasonably 'fast' box so it's no sweat to recompile and reboot. Well, I've got a binary for no-skas-enabled, and a binary for skas-enabled, so I can easily switch between the two for testing. Anything I can do to help out with testing/debugging of this problem? If it isn't some 'stupid operator error', of course. ;) Final comment... I took all the defaults (because they looked reasonable and appropriate) when doing 'make config ARCH=um' in the UML kernel build. So, nothing exotic there. Also scourged all the web pages at the sourceforge web site for this project and didn't find any mention of this as a known bug or issue, nor a common problem with workaround/fix. Ditto with a Google search. UML's a most *impressive* piece of work with so much raw potential, so I am quite enthused and eagerly seek assistance in ironing out this one. I will be rather disappointed (and quite sheepish) if this turns out to be a 'stupid user error' ;) Hopefully not, though! -Dan |