On 20 December 2017 at 00:29, Palmer Dabbelt <pal...@dabbelt.com> wrote: > +#if defined(TARGET_NR_renameat2) && defined(__NR_renameat2) > + case TARGET_NR_renameat2: > + { > + void *p2; > + p = lock_user_string(arg2); > + p2 = lock_user_string(arg4); > + if (!p || !p2) > + ret = -TARGET_EFAULT; > + else > + ret = get_errno(syscall(__NR_renameat2, arg1, p, arg3, p2, > arg5)); > + unlock_user(p2, arg4, 0); > + unlock_user(p, arg2, 0); > + } > + break; > +#endif
Should we have code to handle using plain renameat for flags==0 calls? renameat2() only arrived in 3.15 kernels, so as it stands this patch will work on a smaller set of hosts than it might. thanks -- PMM