On Thu, 2006-12-21 at 15:43 +1100, David Gibson wrote:
> Current powerpc kernels have a bug, where due to bugs in the powerpc
> version of hugetlb_get_unmapped_area(), 32-bit mmap()s which attempt
> to create a mapping extending past TASK_SIZE (4GB) can cause a BUG()
> to be triggered.  This patch adds a testcase for this bug. 

I've tested this patch/test combo. Unpatched kernel gives the below
oops. Patched kernel passes the test suite.

 Oops: Exception in kernel mode, sig: 5 [#1]
SMP NR_CPUS=128 NUMA PSERIES LPAR 
Modules linked in: ipv6 loop dm_mod st sym53c8xx scsi_transport_spi sg sr_mod 
cdrom ibmvscsic e1000 sd_mod scsi_mod
NIP: C000000000033214 LR: C0000000000A9F60 CTR: C000000000033180
REGS: c00000076dae38d0 TRAP: 0700   Not tainted  (2.6.16.21-0.8-ppc64)
MSR: 8000000000029032 <EE,ME,IR,DR>  CR: 40000424  XER: 00000000
TASK = c00000077f611060[9685] 'task-size-overr' THREAD: c00000076dae0000 CPU: 2
GPR00: 0000000000000001 C00000076DAE3B50 C000000000624668 C000000778B5E780 
GPR04: 00000000FF000000 0000000002000000 0000000000000000 0000000000000001 
GPR08: 0000000000000000 0000000000000001 C0000000005DE5F8 0000000000000000 
GPR12: 000000000000F932 C00000000048B280 0000000010080000 0000000000000000 
GPR16: 00000000100A0000 00000000100B4B38 0000000000000001 0000000000000000 
GPR20: 0000000002000000 0000000000000000 0000000000002000 0000000000000000 
GPR24: FFFFFFFFFFFFFFB5 0000000000000003 C000000000439080 0000000000000000 
GPR28: 0000000002000000 0000000002000000 0000000101000000 00000000FF000000 
NIP [C000000000033214] .hugetlb_get_unmapped_area+0x94/0x2b0
LR [C0000000000A9F60] .get_unmapped_area+0x88/0x200
Call Trace:
[C00000076DAE3B50] [C00000000011386C] .dnotify_parent+0x40/0xcc (unreliable)
[C00000076DAE3BE0] [C0000000000A9F60] .get_unmapped_area+0x88/0x200
[C00000076DAE3C70] [C0000000000ABCF4] .do_mmap_pgoff+0x168/0x870
[C00000076DAE3D80] [C00000000000A9C0] .sys_mmap+0xdc/0x160
[C00000076DAE3E30] [C00000000000871C] syscall_exit+0x0/0x40
Instruction dump:
7c000110 7c0000d0 0b000000 78290464 e8090080 7809dfe3 41820120 3c000001 
780083e4 7c1e0010 7c000110 7c0000d0 <0b000000> e92d0198 2fa40000 e92900f8 

-- 

Steve Fox
IBM Linux Technology Center

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to