summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangbiao <biao716.wang@samsung.com>2024-04-09 15:30:25 +0900
committerwangbiao <biao716.wang@samsung.com>2024-04-11 11:37:11 +0900
commit5d2f4235d7505e3a3d12d225b6d6ed54f0a28051 (patch)
tree31539d328183d9a02db97c12519ddb88f577c1c4
parent6197ec0deb7eabc115a37c6a13c14523852c1dc8 (diff)
downloadqemu-5d2f4235d7505e3a3d12d225b6d6ed54f0a28051.tar.gz
qemu-5d2f4235d7505e3a3d12d225b6d6ed54f0a28051.tar.bz2
qemu-5d2f4235d7505e3a3d12d225b6d6ed54f0a28051.zip
issue:https://github.sec.samsung.net/RS-tizen-build/issues/issues/1586 patch from open source: https://github.com/qemu/qemu/commit/35a2c85f7d691db7aa2c47181902ac87478eef7a Change-Id: I56f7c150e638d6051a230a32c05b129a5b4d7db1 Signed-off-by: wangbiao <biao716.wang@samsung.com>
-rw-r--r--linux-user/strace.c2
-rw-r--r--linux-user/strace.list3
-rw-r--r--linux-user/syscall.c9
3 files changed, 13 insertions, 1 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 11fea14fb..9552c2b06 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1923,7 +1923,7 @@ print_execv(void *cpu_env, const struct syscallname *name,
}
#endif
-#ifdef TARGET_NR_faccessat
+#if defined(TARGET_NR_faccessat) || defined(TARGET_NR_faccessat2)
static void
print_faccessat(void *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 084048ab9..6d6affaaa 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 72c10911d..63c049893 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8752,6 +8752,15 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
unlock_user(p, arg2, 0);
return ret;
#endif
+#if defined(TARGET_NR_faccessat2)
+ case TARGET_NR_faccessat2:
+ if (!(p = lock_user_string(arg2))) {
+ return -TARGET_EFAULT;
+ }
+ ret = get_errno(faccessat(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));