Hi,
 I have a gentoo installation running the following kernel:

uname -a
Linux avi-server 3.1.0-gentoo #6 SMP Sat Mar 24 12:48:22 PDT 2012 x86_64 Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz GenuineIntel GNU/Linux

I wanted to run linux kernel 2.6.38 uner UML on this system. I checked out the git repository for linux kernel (from kernel.org), and compiled a 2.6.38 kernel image for UML, with the default config. However, on running the UML 2.6.38 kernel with a gentoo rootfs, the UML aborts with a kernel panic. 

However, when I compiled linux kernel 3.1.0 for the UML architecture things worked perfectly. I was able to boot linux kernel 3.1.0 under UML (with a gentoo rootfs). Is there a kernel dependency for UML, that I can't run a 2.6 kernel under 3.1? The website doesn't seem to mention any such dependency.

Here is the error that I am observing on starting UML with linux kernel 2.6.38 on a 3.1.0 system:

./linux ubda=~/dev/kernel/UML/Gentoo-10.0-AMD64-root_fs mem=512M stderr=1
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Linux version 2.6.38 (asridharan@avi-server) (gcc version 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) ) #1 Sat May 26 20:53:32 PDT 2012
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129280
Kernel command line: ubda=/home/asridharan/dev/kernel/UML/Gentoo-10.0-AMD64-root_fs mem=512M stderr=1 root=98:0
PID hash table entries: 2048 (order: 2, 16384 bytes)
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
Memory: 506088k available
NR_IRQS:15
console [stderr0] enabled
Calibrating delay loop... 367.00 BogoMIPS (lpj=1835008)
pid_max: default: 32768 minimum: 301
kmem_cache_create: Early error in slab pid
Kernel panic - not syncing: Kernel mode signal 4
Call Trace: 
602417d8:  [<60199354>] panic+0xea/0x1dc
602417f8:  [<60037e44>] update_process_times+0x4a/0x52
60241838:  [<6004b0c4>] tick_handle_periodic+0xf/0x56
60241858:  [<60013ae3>] um_timer+0xf/0x16
60241868:  [<60054485>] handle_IRQ_event+0x9d/0xac
602418a8:  [<60055f4f>] handle_edge_irq+0xfd/0x123
602418d8:  [<60014bbf>] relay_signal+0x38/0x79
60241908:  [<60021f21>] sig_handler_common+0x84/0x98
60241928:  [<60021f71>] real_alarm_handler+0x3c/0x3e
602419b0:  [<60024de8>] __delay+0xa/0x16
60241a38:  [<60022016>] sig_handler+0x30/0x3e
60241a58:  [<60021c41>] handle_signal+0x6f/0xa5
60241aa8:  [<60023968>] hard_handler+0x10/0x14
60241b68:  [<600789e2>] kmem_cache_create+0x63/0x426


Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.38
RIP: 0000:[<0000000000000000>]
RSP: 0000000000000000  EFLAGS: 00000000
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Call Trace: 
60241768:  [<60014db5>] panic_exit+0x2f/0x45
60241788:  [<600467fc>] notifier_call_chain+0x32/0x5e
602417c8:  [<60046842>] atomic_notifier_call_chain+0xf/0x11
602417d8:  [<6019936f>] panic+0x105/0x1dc
602417f8:  [<60037e44>] update_process_times+0x4a/0x52
60241838:  [<6004b0c4>] tick_handle_periodic+0xf/0x56
60241858:  [<60013ae3>] um_timer+0xf/0x16
60241868:  [<60054485>] handle_IRQ_event+0x9d/0xac
602418a8:  [<60055f4f>] handle_edge_irq+0xfd/0x123
602418d8:  [<60014bbf>] relay_signal+0x38/0x79
60241908:  [<60021f21>] sig_handler_common+0x84/0x98
60241928:  [<60021f71>] real_alarm_handler+0x3c/0x3e
602419b0:  [<60024de8>] __delay+0xa/0x16
60241a38:  [<60022016>] sig_handler+0x30/0x3e
60241a58:  [<60021c41>] handle_signal+0x6f/0xa5
60241aa8:  [<60023968>] hard_handler+0x10/0x14
60241b68:  [<600789e2>] kmem_cache_create+0x63/0x426

Aborted