> The execve_wrapper macro loads thread->task like this: > LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 > > This assumes that at the point the macro is called that there is only > THREAD_SZ_ALGN+FRAME_SIZE between %r30 and the starting value of %r30 > (cr30). > > However, in the syscall entry path I see (syscall.S): > ldo THREAD_SZ_ALGN+FRAME_SIZE(%r30),%r30 /* set up kernel stack */ > ... > STREGM %r1,FRAME_SIZE(%r30) /* save r1 (usp) here for now */ > > Which means that between %r30 and the start there is actually > THREAD_SZ_ALGN+2*FRAME_SIZE. This is wrong as there is a compensating LDREGM: LDREGM -FRAME_SIZE(%r30), %r2 /* get users sp back */ > or heaven forbid the easier to read: > > mfctl %cr30,%r1 /* get task ptr in %r1 */ > LDREG TI_TASK(%r1),%r1 The above looks safer... Dave -- J. David Anglin dave.anglin@xxxxxxxxxxxxxx National Research Council of Canada (613) 990-0752 (FAX: 952-6602) -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html