Projects STRLCPY criu Commits 03fb0b82
🤬
  • syscall: fix arguments for preadv()

    It has two arguments "pos_l and "pos_h" instead of one "off". It is used
    to handle 64-bit offsets on 32-bit kernels.
    
    SYSCALL_DEFINE5(preadv, unsigned long, fd, const struct iovec __user *, vec,
                    unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h)
    
    https://github.com/checkpoint-restore/criu/issues/424
    Signed-off-by: Andrei Vagin <[email protected]>
    Reviewed-by: Dmitry Safonov <[email protected]>
    Signed-off-by: Andrei Vagin <[email protected]>
  • Loading...
  • Andrei Vagin committed with Andrei Vagin 6 years ago
    03fb0b82
    1 parent 88fbd37f
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■
    compel/arch/arm/plugins/std/syscalls/syscall.def
    skipped 106 lines
    107 107  io_getevents 4 245 (aio_context_t ctx, long min_nr, long nr, struct io_event *evs, struct timespec *tmo)
    108 108  seccomp 277 383 (unsigned int op, unsigned int flags, const char *uargs)
    109 109  gettimeofday 169 78 (struct timeval *tv, struct timezone *tz)
    110  -preadv 69 361 (int fd, struct iovec *iov, unsigned long nr, loff_t off)
     110 +preadv_raw 69 361 (int fd, struct iovec *iov, unsigned long nr, unsigned long pos_l, unsigned long pos_h)
    111 111  userfaultfd 282 388 (int flags)
    112 112   
  • ■ ■ ■ ■
    compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
    skipped 103 lines
    104 104  __NR_io_submit 230 sys_io_submit (aio_context_t ctx_id, long nr, struct iocb **iocbpp)
    105 105  __NR_ipc 117 sys_ipc (unsigned int call, int first, unsigned long second, unsigned long third, const void *ptr, long fifth)
    106 106  __NR_gettimeofday 78 sys_gettimeofday (struct timeval *tv, struct timezone *tz)
    107  -__NR_preadv 320 sys_preadv (int fd, struct iovec *iov, unsigned long nr, loff_t off)
     107 +__NR_preadv 320 sys_preadv_raw (int fd, struct iovec *iov, unsigned long nr, unsigned long pos_l, unsigned long pos_h)
    108 108  __NR_userfaultfd 364 sys_userfaultfd (int flags)
    109 109   
  • ■ ■ ■ ■
    compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl
    skipped 103 lines
    104 104  __NR_io_submit 246 sys_io_submit (aio_context_t ctx_id, long nr, struct iocb **iocbpp)
    105 105  __NR_ipc 117 sys_ipc (unsigned int call, int first, unsigned long second, unsigned long third, const void *ptr, long fifth)
    106 106  __NR_userfaultfd 355 sys_userfaultfd (int flags)
    107  -__NR_preadv 328 sys_preadv (int fd, struct iovec *iov, unsigned long nr, loff_t off)
     107 +__NR_preadv 328 sys_preadv_raw (int fd, struct iovec *iov, unsigned long nr, unsigned long pos_l, unsigned long pos_h)
    108 108  __NR_gettimeofday 78 sys_gettimeofday (struct timeval *tv, struct timezone *tz)
    109 109   
  • ■ ■ ■ ■
    compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
    skipped 83 lines
    84 84  __NR_vmsplice 316 sys_vmsplice (int fd, const struct iovec *iov, unsigned int nr_segs, unsigned int flags)
    85 85  __NR_signalfd 321 sys_signalfd (int ufd, const k_rtsigset_t *sigmask, size_t sigsetsize)
    86 86  __NR_timerfd_settime 325 sys_timerfd_settime (int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr)
    87  -__NR_preadv 333 sys_preadv (int fd, struct iovec *iov, unsigned long nr, loff_t off)
     87 +__NR_preadv 333 sys_preadv_raw (int fd, struct iovec *iov, unsigned long nr, unsigned long pos_l, unsigned long pos_h)
    88 88  __NR_rt_tgsigqueueinfo 335 sys_rt_tgsigqueueinfo (pid_t tgid, pid_t pid, int sig, siginfo_t *uinfo)
    89 89  __NR_fanotify_init 338 sys_fanotify_init (unsigned int flags, unsigned int event_f_flags)
    90 90  __NR_fanotify_mark 339 sys_fanotify_mark (int fanotify_fd, unsigned int flag, uint32_t mask, int dfd, const char *pathname)
    skipped 7 lines
  • ■ ■ ■ ■
    compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
    skipped 95 lines
    96 96  __NR_vmsplice 278 sys_vmsplice (int fd, const struct iovec *iov, unsigned long nr_segs, unsigned int flags)
    97 97  __NR_timerfd_settime 286 sys_timerfd_settime (int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr)
    98 98  __NR_signalfd4 289 sys_signalfd (int fd, k_rtsigset_t *mask, size_t sizemask, int flags)
    99  -__NR_preadv 295 sys_preadv (int fd, struct iovec *iov, unsigned long nr, loff_t off)
     99 +__NR_preadv 295 sys_preadv_raw (int fd, struct iovec *iov, unsigned long nr, unsigned long pos_l, unsigned long pos_h)
    100 100  __NR_rt_tgsigqueueinfo 297 sys_rt_tgsigqueueinfo (pid_t tgid, pid_t pid, int sig, siginfo_t *info)
    101 101  __NR_fanotify_init 300 sys_fanotify_init (unsigned int flags, unsigned int event_f_flags)
    102 102  __NR_fanotify_mark 301 sys_fanotify_mark (int fanotify_fd, unsigned int flags, uint64_t mask, int dfd, const char *pathname)
    skipped 6 lines
  • ■ ■ ■ ■ ■ ■
    compel/plugins/include/uapi/std/syscall-types.h
    skipped 14 lines
    15 15  #include <fcntl.h>
    16 16  #include <time.h>
    17 17   
     18 +#include "common/bitsperlong.h"
     19 + 
    18 20  struct cap_header {
    19 21   uint32_t version;
    20 22   int pid;
    skipped 31 lines
    52 54  typedef int kernel_timer_t;
    53 55   
    54 56  #include <compel/plugins/std/asm/syscall-types.h>
     57 + 
     58 + 
     59 +extern long sys_preadv_raw(int fd, struct iovec *iov, unsigned long nr, unsigned long pos_l, unsigned long pos_h);
     60 + 
     61 +static inline long sys_preadv(int fd, struct iovec *iov, unsigned long nr, off_t off)
     62 +{
     63 +#if BITS_PER_LONG == 64
     64 + return sys_preadv_raw(fd, iov, nr, off, 0);
     65 +#elif BITS_PER_LONG == 32
     66 + return sys_preadv_raw(fd, iov, nr, off, ((uint64_t)off) >> 32);
     67 +#else
     68 +# error "BITS_PER_LONG isn't defined"
     69 +#endif
     70 +}
    55 71   
    56 72  #endif /* COMPEL_SYSCALL_TYPES_H__ */
    57 73   
Please wait...
Page is in error, reload to recover