* ddd
@ 2022-09-27 11:21 Helge Deller
2022-09-27 11:24 ` [PATCH v2] linux-user: Add faccessat2() syscall Helge Deller
2022-09-27 13:11 ` ddd Bin Meng
0 siblings, 2 replies; 4+ messages in thread
From: Helge Deller @ 2022-09-27 11:21 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel, Richard Henderson
Add faccessat2() with strace output.
Signed-off-by: Helge Deller <deller@gmx.de>
---
v2: Resending with minor commit message changes.
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 7d882526da..307d19f5d0 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1931,7 +1931,7 @@ print_execv(CPUArchState *cpu_env, const struct syscallname *name,
}
#endif
-#ifdef TARGET_NR_faccessat
+#if defined(TARGET_NR_faccessat) || defined(TARGET_NR_faccessat2)
static void
print_faccessat(CPUArchState *cpu_env, const struct syscallname *name,
abi_long arg0, abi_long arg1, abi_long arg2,
diff --git a/linux-user/strace.list b/linux-user/strace.list
index 72e17b1acf..ef120ddd11 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -177,6 +177,9 @@
#ifdef TARGET_NR_faccessat
{ TARGET_NR_faccessat, "faccessat" , NULL, print_faccessat, NULL },
#endif
+#ifdef TARGET_NR_faccessat2
+{ TARGET_NR_faccessat2, "faccessat2" , NULL, print_faccessat, NULL },
+#endif
#ifdef TARGET_NR_fadvise64
{ TARGET_NR_fadvise64, "fadvise64" , NULL, NULL, NULL },
#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f409121202..f51c4fbabd 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -399,6 +399,9 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
#if defined(TARGET_NR_getrandom) && defined(__NR_getrandom)
_syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
#endif
+#if defined(TARGET_NR_faccessat2) && defined(__NR_faccessat2)
+_syscall4(int, faccessat2, int, dirfd, char *, pathname, int, mode, int, flags)
+#endif
#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
@@ -9098,6 +9101,15 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
unlock_user(p, arg2, 0);
return ret;
#endif
+#if defined(TARGET_NR_faccessat2) && defined(__NR_faccessat2)
+ case TARGET_NR_faccessat2:
+ if (!(p = lock_user_string(arg2))) {
+ return -TARGET_EFAULT;
+ }
+ ret = get_errno(faccessat2(arg1, p, arg3, arg4));
+ unlock_user(p, arg2, 0);
+ return ret;
+#endif
#ifdef TARGET_NR_nice /* not on alpha */
case TARGET_NR_nice:
return get_errno(nice(arg1));
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] linux-user: Add faccessat2() syscall
2022-09-27 11:21 ddd Helge Deller
@ 2022-09-27 11:24 ` Helge Deller
2022-09-27 13:11 ` ddd Bin Meng
1 sibling, 0 replies; 4+ messages in thread
From: Helge Deller @ 2022-09-27 11:24 UTC (permalink / raw)
To: Laurent Vivier, Richard Henderson, qemu-devel
Add faccessat2() with strace output.
Signed-off-by: Helge Deller <deller@gmx.de>
---
v2: Resending with minor commit message changes.
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 7d882526da..307d19f5d0 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1931,7 +1931,7 @@ print_execv(CPUArchState *cpu_env, const struct syscallname *name,
}
#endif
-#ifdef TARGET_NR_faccessat
+#if defined(TARGET_NR_faccessat) || defined(TARGET_NR_faccessat2)
static void
print_faccessat(CPUArchState *cpu_env, const struct syscallname *name,
abi_long arg0, abi_long arg1, abi_long arg2,
diff --git a/linux-user/strace.list b/linux-user/strace.list
index 72e17b1acf..ef120ddd11 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -177,6 +177,9 @@
#ifdef TARGET_NR_faccessat
{ TARGET_NR_faccessat, "faccessat" , NULL, print_faccessat, NULL },
#endif
+#ifdef TARGET_NR_faccessat2
+{ TARGET_NR_faccessat2, "faccessat2" , NULL, print_faccessat, NULL },
+#endif
#ifdef TARGET_NR_fadvise64
{ TARGET_NR_fadvise64, "fadvise64" , NULL, NULL, NULL },
#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f409121202..f51c4fbabd 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -399,6 +399,9 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
#if defined(TARGET_NR_getrandom) && defined(__NR_getrandom)
_syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
#endif
+#if defined(TARGET_NR_faccessat2) && defined(__NR_faccessat2)
+_syscall4(int, faccessat2, int, dirfd, char *, pathname, int, mode, int, flags)
+#endif
#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
@@ -9098,6 +9101,15 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
unlock_user(p, arg2, 0);
return ret;
#endif
+#if defined(TARGET_NR_faccessat2) && defined(__NR_faccessat2)
+ case TARGET_NR_faccessat2:
+ if (!(p = lock_user_string(arg2))) {
+ return -TARGET_EFAULT;
+ }
+ ret = get_errno(faccessat2(arg1, p, arg3, arg4));
+ unlock_user(p, arg2, 0);
+ return ret;
+#endif
#ifdef TARGET_NR_nice /* not on alpha */
case TARGET_NR_nice:
return get_errno(nice(arg1));
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: ddd
2022-09-27 11:21 ddd Helge Deller
2022-09-27 11:24 ` [PATCH v2] linux-user: Add faccessat2() syscall Helge Deller
@ 2022-09-27 13:11 ` Bin Meng
2022-09-27 13:25 ` ddd Helge Deller
1 sibling, 1 reply; 4+ messages in thread
From: Bin Meng @ 2022-09-27 13:11 UTC (permalink / raw)
To: Helge Deller; +Cc: Laurent Vivier, qemu-devel, Richard Henderson
On Tue, Sep 27, 2022 at 9:09 PM Helge Deller <deller@gmx.de> wrote:
>
> Add faccessat2() with strace output.
>
> Signed-off-by: Helge Deller <deller@gmx.de>
>
> ---
> v2: Resending with minor commit message changes.
>
The commit summary makes no sense. Would you please resend?
Regards,
Bin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ddd
2022-09-27 13:11 ` ddd Bin Meng
@ 2022-09-27 13:25 ` Helge Deller
0 siblings, 0 replies; 4+ messages in thread
From: Helge Deller @ 2022-09-27 13:25 UTC (permalink / raw)
To: Bin Meng; +Cc: Laurent Vivier, qemu-devel, Richard Henderson
On 9/27/22 15:11, Bin Meng wrote:
> On Tue, Sep 27, 2022 at 9:09 PM Helge Deller <deller@gmx.de> wrote:
>>
>> Add faccessat2() with strace output.
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>>
>> ---
>> v2: Resending with minor commit message changes.
>>
>
> The commit summary makes no sense. Would you please resend?
Yes, sorry. "vi" tricked on me.
I did resend a few minutes later:
https://lists.nongnu.org/archive/html/qemu-devel/2022-09/msg04489.html
Helge
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-27 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 11:21 ddd Helge Deller
2022-09-27 11:24 ` [PATCH v2] linux-user: Add faccessat2() syscall Helge Deller
2022-09-27 13:11 ` ddd Bin Meng
2022-09-27 13:25 ` ddd Helge Deller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.