Thread (9 messages) 9 messages, 4 authors, 2006-05-01

Re: sign extension for 32bit syscalls on ppc64

From: Stephen Rothwell <hidden>
Date: 2006-05-01 03:44:56

On Mon, 1 May 2006 10:05:18 +1000 Stephen Rothwell [off-list ref] wrote:
Try mkdirat. openat has a compat wrapper that has the dfd paramater
declared as a unsigned int and passes it to sys_openat, whose first
paramter is decalred to be int, so the sign extension gets done.
OK, I actually tried this and it works! :-(

I traced the code path and it turns out that the place we check for the
-100 (in do_path_lookup), the compiler has used a cmpwi instruction and so
ignores the top 32 bits.  Thus we get away with the ABI abuse!

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Attachments

  • (unnamed) [application/pgp-signature] 189 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help