On Friday 04 February 2005 07:21, Zoltan NAGY wrote: > Jeff Dike wrote: > >How about some more details? > > here it goes... > > the program I'm tring to debug is at http://nagyz.nefty.hu/uml/
> I start the guest: > [EMAIL PROTECTED]:~/uml$ linux/vmlinux ubd0=root mem=256M con0=null,fd:2 > con1=fd:0,fd:1 eth0=tuntap,,,192.168.1.1 > Checking for /proc/mm...found > Checking for the skas3 patch in the host...found > Checking PROT_EXEC mmap in /tmp...OK > Linux version 2.6.11-rc3 ([EMAIL PROTECTED]) (gcc version 3.3.5 (Debian > 1:3.3.5-8)) #1 Thu Feb 3 20:28:14 CET 2005 > This GDB was configured as "i386-linux"...Using host libthread_db > library "/lib/libthread_db.so.1". No TLS it seems, luckily. > (gdb) r > Starting program: /root/t/test > ssh stops.. having a look at the guest's main window... it blowed! > kernel BUG at mm/memory.c:891! > Kernel panic - not syncing: BUG! > Call Trace: > 1724fa40: [<08086f2d>] notifier_call_chain+0x2d/0x50 > 1724fa60: [<080787b2>] panic+0x72/0x120 > 1724fa80: [<080a394b>] get_user_pages+0x15b/0x370 > 1724fab0: [<08081ad0>] access_process_vm+0x90/0x1b0 > 1724fb00: [<0805d29a>] sys_ptrace+0x11a/0x580 > 1724fb20: [<080601b8>] handle_page_fault+0x168/0x200 > 1724fb60: [<08060380>] segv+0x90/0x280 > 1724fba0: [<08062b3a>] execute_syscall_skas+0xaa/0xb0 > 1724fc10: [<0805f219>] record_syscall_start+0x59/0x70 > 1724fc30: [<08062b78>] handle_syscall+0x38/0x70 > 1724fc50: [<08061c1a>] handle_trap+0x2a/0x130 > 1724fc60: [<08072201>] save_registers+0x41/0x80 > 1724fc80: [<08062151>] userspace+0x231/0x240 > 1724fcd0: [<08063026>] force_flush_all_skas+0x36/0x40 > 1724fcf0: [<080627f3>] fork_handler+0xb3/0xd0 > > that's all... > > I could not get more info out of it.. but I'd like to know if there's > anything more I could do to help. What's the status of CONFIG_3_LEVEL_PGTABLES? I'm asking because the BUG'ing line reads like this: get_user_pages(...) ... BUG_ON(pgd_none(*pgd)); pud = pud_offset(pgd, pg); BUG_ON(pud_none(*pud)); pmd = pmd_offset(pud, pg); BUG_ON(pmd_none(*pmd)); //this IS line 891. pte = pte_offset_map(pmd, pg); BUG_ON(pte_none(*pte)); From my patchlist, I'm going to choose a patch which changes somethings which actually relate to this bug... if it does not work, then retest both by enabling and disablign the above CONFIG_ option. Hope this helps! -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>, Jeff Dike <[EMAIL PROTECTED]> The previous ifdef to check whether to use the host's vsyscall page was buggy. This bug can cause crashes. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- linux-2.6.11-paolo/arch/um/Kconfig_i386 | 4 ++++ linux-2.6.11-paolo/arch/um/Kconfig_x86_64 | 4 ++++ linux-2.6.11-paolo/arch/um/kernel/mem.c | 12 ++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff -puN arch/um/Kconfig_i386~uml-vsyscall arch/um/Kconfig_i386 --- linux-2.6.11/arch/um/Kconfig_i386~uml-vsyscall 2005-02-04 06:22:14.731673232 +0100 +++ linux-2.6.11-paolo/arch/um/Kconfig_i386 2005-02-04 06:22:14.738672168 +0100 @@ -18,3 +18,7 @@ config 3_LEVEL_PGTABLES config ARCH_HAS_SC_SIGNALS bool default y + +config ARCH_REUSE_HOST_VSYSCALL_AREA + bool + default y diff -puN arch/um/Kconfig_x86_64~uml-vsyscall arch/um/Kconfig_x86_64 --- linux-2.6.11/arch/um/Kconfig_x86_64~uml-vsyscall 2005-02-04 06:22:14.733672928 +0100 +++ linux-2.6.11-paolo/arch/um/Kconfig_x86_64 2005-02-04 06:22:14.739672016 +0100 @@ -9,3 +9,7 @@ config 3_LEVEL_PGTABLES config ARCH_HAS_SC_SIGNALS bool default n + +config ARCH_REUSE_HOST_VSYSCALL_AREA + bool + default n diff -puN arch/um/kernel/mem.c~uml-vsyscall arch/um/kernel/mem.c --- linux-2.6.11/arch/um/kernel/mem.c~uml-vsyscall 2005-02-04 06:22:14.735672624 +0100 +++ linux-2.6.11-paolo/arch/um/kernel/mem.c 2005-02-04 06:22:14.739672016 +0100 @@ -152,6 +152,7 @@ void __init kmap_init(void) static void init_highmem(void) { pgd_t *pgd; + pud_t *pud; pmd_t *pmd; pte_t *pte; unsigned long vaddr; @@ -163,7 +164,8 @@ static void init_highmem(void) fixrange_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, swapper_pg_dir); pgd = swapper_pg_dir + pgd_index(vaddr); - pmd = pmd_offset(pgd, vaddr); + pud = pud_offset(pgd, vaddr); + pmd = pmd_offset(pud, vaddr); pte = pte_offset_kernel(pmd, vaddr); pkmap_page_table = pte; @@ -173,9 +175,10 @@ static void init_highmem(void) static void __init fixaddr_user_init( void) { -#if FIXADDR_USER_START != 0 +#if CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA long size = FIXADDR_USER_END - FIXADDR_USER_START; pgd_t *pgd; + pud_t *pud; pmd_t *pmd; pte_t *pte; unsigned long paddr, vaddr = FIXADDR_USER_START; @@ -187,9 +190,10 @@ static void __init fixaddr_user_init( vo paddr = (unsigned long)alloc_bootmem_low_pages( size); memcpy( (void *)paddr, (void *)FIXADDR_USER_START, size); paddr = __pa(paddr); - for ( ; size > 0; size-=PAGE_SIZE, vaddr+=PAGE_SIZE, paddr+=PAGE_SIZE) { + for ( ; size > 0; size-=PAGE_SIZE, vaddr+=PAGE_SIZE, paddr+=PAGE_SIZE){ pgd = swapper_pg_dir + pgd_index(vaddr); - pmd = pmd_offset(pgd, vaddr); + pud = pud_offset(pgd, vaddr); + pmd = pmd_offset(pud, vaddr); pte = pte_offset_kernel(pmd, vaddr); pte_set_val( (*pte), paddr, PAGE_READONLY); } _