Skip to contentSkip to conversation

ia64 uaccess changes?

DISCUSSION Zou Nan hai 4 participants 6 messages Feb 4, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 14 lines · Andrew Morton

Did something changed with the ia64 uaccess functions a few weeks ago?

Because a couple of weeks ago I was seeing repeatable oopses in Linus's
tree early in boot in create_elf_tables(), here:

        /* Now, let's put argc (and argv, envp if appropriate) on the
stack */
        if (__put_user(argc, sp++))
                return -EFAULT;

that shouldn't happen.

Quoted 8 lines

Now, Linus's tree works OK, but I'm seeing repeatable oopses late in boot
with this patch applied:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/broken-out/add-do_proc_doulonglongvec_minmax-to-sysctl-functions.patch

which is crazy - that code isn't even executed.

Hi Andrew,

I have tested both 2.6.11-rc3 and 2.6.11-rc2-mm2 on a Tiger.

They all boot fine.

Zou Nan hai

#1 lore raw

Did something changed with the ia64 uaccess functions a few weeks ago?

Because a couple of weeks ago I was seeing repeatable oopses in Linus's tree early in boot in create_elf_tables(), here:

	/* Now, let's put argc (and argv, envp if appropriate) on the stack */
	if (__put_user(argc, sp++))
		return -EFAULT;

that shouldn't happen.

Now, Linus's tree works OK, but I'm seeing repeatable oopses late in boot with this patch applied:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/broken-out/add-do_proc_doulonglongvec_minmax-to-sysctl-functions.patch

which is crazy - that code isn't even executed.

They look like this:

Pid: 1003, CPU 3, comm: mount
psr : 0000101008026018 ifs : 8000000000000309 ip : [<a000000100169070>] Notd
ip is at exact_copy_from_user+0x70/0x120
unat: 0000000000000000 pfs : 000000000000040b rsc : 0000000000000003
rnat: 800000000000058e bsps: 0000000000000000 pr : 0000000000005559
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f csd : 0000000000000000 ssd : 0000000000000000
b0 : a0000001001691c0 b6 : a000000100002d70 b7 : a000000100002cd0 f6 : 1003e6db6db6db6db6db7 f7 : 000000000000000000000 f8 : 1003e000000000000f1d4 f9 : 1003e0000000000069ccc f10 : 000000000000000000000 f11 : 000000000000000000000 r1 : a000000100df22c0 r2 : e00000003f1f0d48 r3 : 00000fffffffbfff r8 : 0000000000000000 r9 : 0000000000000000 r10 : a000000100c0ea70 r11 : e00000003c750000 r12 : e00000003f1f7e10 r13 : e00000003f1f0000 r14 : 9fffffffffffffff r15 : 000000000000f1d4 r16 : 6db6db6db6db6db7 r17 : 0000000000069ccc r18 : 000000000034e660 r19 : e000000004d61000 r20 : a000000100c0ea50 r21 : 000000000000ffb1 r22 : a000000100c2bc80 r23 : a000000100a3b200 r24 : a000000100c2bc80 r25 : 0000000000000000 r26 : 0000000000004000 r27 : 0000000000000000 r28 : 2000000000212680 r29 : 0000000000000008 r30 : 0000000000000009 r31 : 0000000000200200

Call Trace:
 [<a00000010000f360>] show_stack+0x80/0xa0
                                spà0000003f1f79d0 bspà0000003f1f1090
 [<a00000010000fbc0>] show_regs+0x7e0/0x800                             
                                spà0000003f1f7ba0 bspà0000003f1f1030
 [<a000000100033830>] die+0x150/0x1c0                                   
                                spà0000003f1f7bb0 bspà0000003f1f0fe8
 [<a000000100053890>] ia64_do_page_fault+0x370/0x980                    
                                spà0000003f1f7bb0 bspà0000003f1f0f80
 [<a00000010000a780>] ia64_leave_kernel+0x0/0x260                       
                                spà0000003f1f7c40 bspà0000003f1f0f80
 [<a000000100169070>] exact_copy_from_user+0x70/0x120                   
                                spà0000003f1f7e10 bspà0000003f1f0f38
 [<a0000001001691c0>] copy_mount_options+0xa0/0x160                     
                                spà0000003f1f7e10 bspà0000003f1f0ef8
 [<a000000100169c50>] sys_mount+0x30/0x1c0                              
                                spà0000003f1f7e10 bspà0000003f1f0e70
 [<a00000010000a600>] ia64_ret_from_syscall+0x0/0x20                    
                                spà0000003f1f7e30 bspà0000003f1f0e70
 <6>Adding 2024144k swap on /dev/sda2.  Priority:-1 extents:1           
Unable to handle kernel paging request at virtual address 6000000000018000

copy_mount_options() is a popular place for kernels to oops if there's anything unusual in the uaccess handling.

Thanks.

#2 lore raw
In reply to Zou Nan hai
Quoted 13 lines · Andrew Morton

Did something changed with the ia64 uaccess functions a few weeks ago?

Because a couple of weeks ago I was seeing repeatable oopses in Linus's tree early in boot in create_elf_tables(), here:

	/* Now, let's put argc (and argv, envp if appropriate) on the stack */
	if (__put_user(argc, sp++))
		return -EFAULT;

that shouldn't happen.

Quoted 6 lines

Now, Linus's tree works OK, but I'm seeing repeatable oopses late in boot with this patch applied:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/broken-out/add-do_proc_doulonglongvec_minmax-to-sysctl-functions.patch

which is crazy - that code isn't even executed.

2.6.11-rc3 also breaks on SN2 in create_elf_tables().

Freeing unused kernel memory: 352kB freed
init[1]: IA-64 Illegal operation fault 0 [1]

Modules linked in:

Pid: 1, CPU 1, comm: init
psr : 0000101008026018 ifs : 8000000000000710 ip : [<a0000001001ae120>] Not tainted
ip is at create_elf_tables+0x3c0/0x800
unat: 0000000000000000 pfs : 0000000000000000 rsc : 0000000000000000
rnat: 0000000000000000 bsps: e00000b07a850e70 pr : 000000000000801b
ldrs: 0000000000880000 ccv : 0000000000000000 fpsr: 0009804c8a70433f csd : 0000000000000000 ssd : 0000000000000000
f6 : 000000000000000000000 f7 : 000000000000000000000 f8 : 000000000000000000000 f9 : 000000000000000000000 f10 : 000000000000000000000 f11 : 000000000000000000000
r1 : a000000100ce0720 r2 : e00000b07a857d10 r3 : 0000000000000308 r8 : 0000000000000000 r9 : 0000000000000000 r10 : 0000000000000000 r11 : 0000000000000000 r12 : 60000fffffffbdf0 r13 : e00000b07a850000 r14 : 0000000000000000 r15 : 0000000000000409 r16 : e00000b07a850e70 r17 : ffffffffffffffc1 r18 : 0000000000000040 r19 : 0000000000000000 r20 : 0009804c0270033f r21 : a000000100009290 r22 : 0000000000000000 r23 : 60000fff7fffc000 r24 : 0000000000000000 r25 : 0000000000000000

     r26 : 0000000000000186 r27 : 000000000000000f r28 : 4000000000000200                                                                          r29 : 00001013085a6000 r30 : 0000000000000003 r31 : 0000000000005541
Call Trace: 
 [<a000000100010220>] show_stack+0x80/0xa0
                                spà0000b07a857b30 bspà0000b07a850f58
 [<a000000100010b00>] show_regs+0x860/0x880 
                                spà0000b07a857d00 bspà0000b07a850ef8
 [<a000000100036050>] die+0x170/0x220
                                spà0000b07a857d10 bspà0000b07a850ec0
 [<a000000100036140>] die_if_kernel+0x40/0x60
                                spà0000b07a857d10 bspà0000b07a850e98
 [<a000000100036c60>] ia64_illegal_op_fault+0x60/0x140
                                spà0000b07a857d10 bspà0000b07a850e78
 [<a000000100003f20>] dispatch_illegal_op_fault+0x300/0x800
                                spà0000b07a857e30 bspà0000b07a850e78

The code in create_elf_tables is good. Single stepping through the offending region works, but as soon as the kernel is allowed to run again it dies at a different place in create_elf_tables.

#3 lore raw
In reply to Zou Nan hai

Keith Owens wrote: [Fri Feb 04 2005, 04:44:29AM EST]

Quoted 55 lines
Quoted 13 lines · Andrew Morton

Did something changed with the ia64 uaccess functions a few weeks ago?

Because a couple of weeks ago I was seeing repeatable oopses in Linus's tree early in boot in create_elf_tables(), here:

	/* Now, let's put argc (and argv, envp if appropriate) on the stack */
	if (__put_user(argc, sp++))
		return -EFAULT;

that shouldn't happen.

Quoted 6 lines

Now, Linus's tree works OK, but I'm seeing repeatable oopses late in boot with this patch applied:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/broken-out/add-do_proc_doulonglongvec_minmax-to-sysctl-functions.patch

which is crazy - that code isn't even executed.

2.6.11-rc3 also breaks on SN2 in create_elf_tables().

Freeing unused kernel memory: 352kB freed
init[1]: IA-64 Illegal operation fault 0 [1]

Modules linked in:

Pid: 1, CPU 1, comm: init
psr : 0000101008026018 ifs : 8000000000000710 ip : [<a0000001001ae120>] Not tainted
ip is at create_elf_tables+0x3c0/0x800
unat: 0000000000000000 pfs : 0000000000000000 rsc : 0000000000000000
rnat: 0000000000000000 bsps: e00000b07a850e70 pr : 000000000000801b
ldrs: 0000000000880000 ccv : 0000000000000000 fpsr: 0009804c8a70433f csd : 0000000000000000 ssd : 0000000000000000
f6 : 000000000000000000000 f7 : 000000000000000000000 f8 : 000000000000000000000 f9 : 000000000000000000000 f10 : 000000000000000000000 f11 : 000000000000000000000
r1 : a000000100ce0720 r2 : e00000b07a857d10 r3 : 0000000000000308 r8 : 0000000000000000 r9 : 0000000000000000 r10 : 0000000000000000 r11 : 0000000000000000 r12 : 60000fffffffbdf0 r13 : e00000b07a850000 r14 : 0000000000000000 r15 : 0000000000000409 r16 : e00000b07a850e70 r17 : ffffffffffffffc1 r18 : 0000000000000040 r19 : 0000000000000000 r20 : 0009804c0270033f r21 : a000000100009290 r22 : 0000000000000000 r23 : 60000fff7fffc000 r24 : 0000000000000000 r25 : 0000000000000000

     r26 : 0000000000000186 r27 : 000000000000000f r28 : 4000000000000200                                                                          r29 : 00001013085a6000 r30 : 0000000000000003 r31 : 0000000000005541
Call Trace: 
 [<a000000100010220>] show_stack+0x80/0xa0
                                spà0000b07a857b30 bspà0000b07a850f58
 [<a000000100010b00>] show_regs+0x860/0x880 
                                spà0000b07a857d00 bspà0000b07a850ef8
 [<a000000100036050>] die+0x170/0x220
                                spà0000b07a857d10 bspà0000b07a850ec0
 [<a000000100036140>] die_if_kernel+0x40/0x60
                                spà0000b07a857d10 bspà0000b07a850e98
 [<a000000100036c60>] ia64_illegal_op_fault+0x60/0x140
                                spà0000b07a857d10 bspà0000b07a850e78
 [<a000000100003f20>] dispatch_illegal_op_fault+0x300/0x800
                                spà0000b07a857e30 bspà0000b07a850e78
Quoted 9 lines

The code in create_elf_tables is good. Single stepping through the offending region works, but as soon as the kernel is allowed to run again it dies at a different place in create_elf_tables.

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Well I was seeing the same problem with 2.6.11-rc2-mm1-mhp1. This fixed it for me. I thought a patch had been sent upstream to Tony. I'm not proposing this as a patch. I believe it was already done.

bob

arch/ia64/kernel/entry.S +1 -1
diff -ruNp -X /home/picco/losl/dontdiff linux-2.6.11-rc2-mm1-mhp1-orig/arch/ia64/kernel/entry.S linux-2.6.11-rc2-mm1-mhp1/arch/ia64/kernel/entry.S
@@ -987,7 +987,7 @@ dont_preserve_current_frame:
 	shladd in0=loc1,3,r17
 	mov in1=0
 	;;
-	.align 32
+	TEXT_ALIGN(32)
 rse_clear_invalid:
 #ifdef CONFIG_ITANIUM
 	// cycle 0
#4 lore raw
In reply to Zou Nan hai
Quoted 8 lines · Bob Picco

Well I was seeing the same problem with 2.6.11-rc2-mm1-mhp1.
This fixed it for me. I thought a patch had been sent upstream to Tony. I'm not proposing this as a patch. I believe it was already done.

bob

Quoted 12 lines

diff -ruNp -X /home/picco/losl/dontdiff linux-2.6.11-rc2-mm1-mhp1-orig/arch/ia64/kernel/entry.S linux-2.6.11-rc2-mm1-mhp1/arch/ia64/kernel/entry.S
--- linux-2.6.11-rc2-mm1-mhp1-orig/arch/ia64/kernel/entry.S 2005-01-26 15:29:06.000000000 -0500
+++ linux-2.6.11-rc2-mm1-mhp1/arch/ia64/kernel/entry.S 2005-01-27 14:30:41.000000000 -0500
@@ -987,7 +987,7 @@ dont_preserve_current_frame:
shladd in0=loc1,3,r17
mov in1=0
;;
- .align 32
+ TEXT_ALIGN(32)
rse_clear_invalid:
#ifdef CONFIG_ITANIUM
// cycle 0

That's already in Linus's tree. And mine. So it's something else.

Were you seeing the same oops?

#5 lore raw
In reply to Zou Nan hai

Andrew Morton wrote: [Fri Feb 04 2005, 06:39:44AM EST]

Quoted 22 lines
Quoted 8 lines · Bob Picco

Well I was seeing the same problem with 2.6.11-rc2-mm1-mhp1.
This fixed it for me. I thought a patch had been sent upstream to Tony. I'm not proposing this as a patch. I believe it was already done.

bob

Quoted 12 lines

diff -ruNp -X /home/picco/losl/dontdiff linux-2.6.11-rc2-mm1-mhp1-orig/arch/ia64/kernel/entry.S linux-2.6.11-rc2-mm1-mhp1/arch/ia64/kernel/entry.S
--- linux-2.6.11-rc2-mm1-mhp1-orig/arch/ia64/kernel/entry.S 2005-01-26 15:29:06.000000000 -0500
+++ linux-2.6.11-rc2-mm1-mhp1/arch/ia64/kernel/entry.S 2005-01-27 14:30:41.000000000 -0500
@@ -987,7 +987,7 @@ dont_preserve_current_frame:
shladd in0=loc1,3,r17
mov in1=0
;;
- .align 32
+ TEXT_ALIGN(32)
rse_clear_invalid:
#ifdef CONFIG_ITANIUM
// cycle 0

Quoted 4 lines

That's already in Linus's tree. And mine. So it's something else.

Were you seeing the same oops?

I was seeing the one in create_elf_tables. So this doesn't sound the same as your problem. Sorry.

bob