[uClibc]Re: pread/pwrite broken w/o large file support

Ronald Wahl rwa at peppercon.com
Thu Jul 4 13:00:58 UTC 2002


On 04 Jul 2002 12:34:06 +0200, Ronald Wahl wrote:

> Now I inserted a printk in the pread syscall that outputs the
> offset. The high part has some arbitrary value (and changes during the
> execution). So you are right. But what is the solution? Splitting does
> not work. 

After a bit of searching I noticed the following: Look at the signature
of sys_pread in kernel:

asmlinkage ssize_t sys_pread(unsigned int fd, char * buf,
                             size_t count, loff_t pos);

Looking at the assembler output of this routine I found that there is a
hole in register allocation because of alignment issues. The argument
"pos" is contained in r7 and r8, i.e. it is aligned to 64bit. But the
_syscall5 puts "pos" into r6 and r7. What is the right way to go here?

ron

-- 
\\      Dipl.-Inf. Ronald Wahl   |   Peppercon AG                  //
 \\\         rwa at peppercon.com  |||  http://www.peppercon.com/   /// 
  \OO  -----------------------  OOO  -------------------------  OO/ 
   OO  GnuPG/PGP key available  OOO  Keep Systems running       OO



More information about the uClibc mailing list