* [Qemu-devel] [PATCH] linux-user: add kcmp() syscall
@ 2016-10-06 12:56 Laurent Vivier
2016-10-06 13:19 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2016-10-06 12:56 UTC (permalink / raw)
To: Riku Voipio; +Cc: qemu-devel, Laurent Vivier
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d21d901..a32386e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -304,6 +304,11 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
_syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
#endif
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
+_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
+ unsigned long, idx1, unsigned long, idx2)
+#endif
+
static bitmask_transtbl fcntl_flags_tbl[] = {
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
{ TARGET_O_ACCMODE, TARGET_O_RDWR, O_ACCMODE, O_RDWR, },
@@ -11943,6 +11948,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = get_errno(unshare(arg1));
break;
#endif
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
+ case TARGET_NR_kcmp:
+ ret = get_errno(kcmp(arg1, arg2, arg3, arg4, arg5));
+ break;
+#endif
default:
unimplemented:
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: add kcmp() syscall
2016-10-06 12:56 [Qemu-devel] [PATCH] linux-user: add kcmp() syscall Laurent Vivier
@ 2016-10-06 13:19 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2016-10-06 13:19 UTC (permalink / raw)
To: Laurent Vivier; +Cc: Riku Voipio, QEMU Developers
On 6 October 2016 at 13:56, Laurent Vivier <laurent@vivier.eu> wrote:
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
> linux-user/syscall.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index d21d901..a32386e 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -304,6 +304,11 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
> _syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
> #endif
>
> +#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
> +_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
> + unsigned long, idx1, unsigned long, idx2)
> +#endif
> +
> static bitmask_transtbl fcntl_flags_tbl[] = {
> { TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
> { TARGET_O_ACCMODE, TARGET_O_RDWR, O_ACCMODE, O_RDWR, },
> @@ -11943,6 +11948,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> ret = get_errno(unshare(arg1));
> break;
> #endif
> +#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
> + case TARGET_NR_kcmp:
> + ret = get_errno(kcmp(arg1, arg2, arg3, arg4, arg5));
> + break;
> +#endif
>
> default:
> unimplemented:
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: add kcmp() syscall
2016-09-25 20:20 Laurent Vivier
@ 2016-09-25 20:29 ` no-reply
0 siblings, 0 replies; 4+ messages in thread
From: no-reply @ 2016-09-25 20:29 UTC (permalink / raw)
To: laurent; +Cc: famz, riku.voipio, qemu-devel
Hi,
Your series seems to have some coding style problems. See output below for
more information:
Message-id: 1474834820-24198-1-git-send-email-laurent@vivier.eu
Type: series
Subject: [Qemu-devel] [PATCH] linux-user: add kcmp() syscall
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/1474834820-24198-1-git-send-email-laurent@vivier.eu -> patchew/1474834820-24198-1-git-send-email-laurent@vivier.eu
Switched to a new branch 'test'
75f537b linux-user: add kcmp() syscall
=== OUTPUT BEGIN ===
Checking PATCH 1/1: linux-user: add kcmp() syscall...
ERROR: architecture specific defines should be avoided
#17: FILE: linux-user/syscall.c:307:
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
ERROR: architecture specific defines should be avoided
#29: FILE: linux-user/syscall.c:11950:
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
total: 2 errors, 0 warnings, 22 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH] linux-user: add kcmp() syscall
@ 2016-09-25 20:20 Laurent Vivier
2016-09-25 20:29 ` no-reply
0 siblings, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2016-09-25 20:20 UTC (permalink / raw)
To: Riku Voipio; +Cc: qemu-devel, Laurent Vivier
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d21d901..a32386e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -304,6 +304,11 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
_syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
#endif
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
+_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
+ unsigned long, idx1, unsigned long, idx2)
+#endif
+
static bitmask_transtbl fcntl_flags_tbl[] = {
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
{ TARGET_O_ACCMODE, TARGET_O_RDWR, O_ACCMODE, O_RDWR, },
@@ -11943,6 +11948,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = get_errno(unshare(arg1));
break;
#endif
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
+ case TARGET_NR_kcmp:
+ ret = get_errno(kcmp(arg1, arg2, arg3, arg4, arg5));
+ break;
+#endif
default:
unimplemented:
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-06 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 12:56 [Qemu-devel] [PATCH] linux-user: add kcmp() syscall Laurent Vivier
2016-10-06 13:19 ` Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2016-09-25 20:20 Laurent Vivier
2016-09-25 20:29 ` no-reply
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.