diff options
author | wangbiao <biao716.wang@samsung.com> | 2024-04-09 15:30:25 +0900 |
---|---|---|
committer | wangbiao <biao716.wang@samsung.com> | 2024-04-11 11:37:11 +0900 |
commit | 5d2f4235d7505e3a3d12d225b6d6ed54f0a28051 (patch) | |
tree | 31539d328183d9a02db97c12519ddb88f577c1c4 | |
parent | 6197ec0deb7eabc115a37c6a13c14523852c1dc8 (diff) | |
download | qemu-sandbox/wangbiao/trim_qemu_tools.tar.gz qemu-sandbox/wangbiao/trim_qemu_tools.tar.bz2 qemu-sandbox/wangbiao/trim_qemu_tools.zip |
Support syscall 439 in linux-useraccepted/tools/qemu5.2.x/20240619.061914sandbox/wangbiao/trim_qemu_toolsaccepted/tools_qemu5.2.x
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.c | 2 | ||||
-rw-r--r-- | linux-user/strace.list | 3 | ||||
-rw-r--r-- | linux-user/syscall.c | 9 |
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)); |