This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21026] New: [MIPS] readahead syscall is broken on n64


https://sourceware.org/bugzilla/show_bug.cgi?id=21026

            Bug ID: 21026
           Summary: [MIPS] readahead syscall is broken on n64
           Product: glibc
           Version: 2.24
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: james410 at cowgill dot org.uk
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The readahead syscall is broken on mips n64. The 64-bit offset argument is
split across 2 registers when it should be passed in a single register. I've
only checked this with glibc 2.24.

I added some code to the kernel to check the arguments it was receiving and it
prints this for the 3 mips architectures:

# cat readahead.c
#define _GNU_SOURCE
#include <fcntl.h>

int main(void)
{
        readahead(42, 1234567890987654321, 6543210);
        return 0;
}
# ./readahead-32 
[  648.838746] sys_readahead(fd = 42, off = 1234567890987654321, count =
6543210)
# ./readahead-n32
[  652.595124] sys_readahead(fd = 42, off = 1234567890987654321, count =
6543210)
# ./readahead-n64
[  654.767523] sys_readahead(fd = 42, off = 2976652465, count = 287445236)

Note that:
1234567890987654321 = 2976652465 | 287445236 << 32

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]