|
From: Tom H. <to...@co...> - 2009-08-14 14:21:30
|
On 14/08/09 14:43, John Reiser wrote: >> pread64(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\2\0\24\0\0\0\1\20\0 "..., 4096, 0) = 4096 >> pread64(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\2\0\24\0\0\0\1\20\0 "..., 4096, 0) = 4096 > > --------------------------------------------------------------------------^^^^-------^^^^ > > [versus] > >> pread64(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\2\0\24\0\0\0\1\20\0 "..., 4096, 0) = 4096 >> pread64(3, "\335\335\335\335\335\335\335\335\335\335\335\335\335\335"..., 52, 0) = 52 > > ----------------------------------------------------------------------------^^-------^^ > > >> Except for the geteuid(), stat64() and fstat64(), there seems to be no difference. > > The second call to pread64 has a third argument of 52 instead of 4096. Which should be fine of course - it just means we're only asking for the first 52 bytes of the file instead of the first 4096 bytes. As far as I know there is no requirement for the size or offset given to pread to be page aligned or anything like that so both should work. It might of course explain why the test program is not showing the problem. I still reckon this is a kernel bug, although it may well be the change in the count that triggers it. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |