* [PATCH] systemtap: Fixed probe syscall.sendfile failure
@ 2014-08-28 10:17 Muzaffar Mahmood
2014-08-28 10:33 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Muzaffar Mahmood @ 2014-08-28 10:17 UTC (permalink / raw)
To: openembedded-core
From: Mikhail Durnev <mikhail_durnev@mentor.com>
Marked __syscall.compat_sendfile as optional
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Muzaffar Mahmood <muzaffar_mahmood@mentor.com>
---
.../systemtap/tapset-linux-sendfile-syscall.patch | 12 ++++++++++++
meta/recipes-kernel/systemtap/systemtap_git.inc | 1 +
2 files changed, 13 insertions(+)
create mode 100644 meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
new file mode 100644
index 0000000..b42ab3c
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
@@ -0,0 +1,12 @@
+diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp
+--- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500
++++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500
+@@ -1953,7 +1953,7 @@
+ # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd,
+ # compat_loff_t __user *, offset, compat_size_t, count)
+ #
+-probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile
++probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ?
+ {
+ name = "sendfile"
+ out_fd = __int32($out_fd)
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 717d66f..3e1e80a 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -6,6 +6,7 @@ PV = "2.5+git${SRCPV}"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
+ file://tapset-linux-sendfile-syscall.patch \
"
# systemtap doesn't support mips
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] systemtap: Fixed probe syscall.sendfile failure
2014-08-28 10:17 [PATCH] systemtap: Fixed probe syscall.sendfile failure Muzaffar Mahmood
@ 2014-08-28 10:33 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2014-08-28 10:33 UTC (permalink / raw)
To: Muzaffar Mahmood; +Cc: openembedded-core
On Thu, 2014-08-28 at 15:17 +0500, Muzaffar Mahmood wrote:
> From: Mikhail Durnev <mikhail_durnev@mentor.com>
>
> Marked __syscall.compat_sendfile as optional
>
> Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
> Signed-off-by: Muzaffar Mahmood <muzaffar_mahmood@mentor.com>
> ---
This says what you did but not why. There is nothing at all in the patch
header, no Upstream-Status, no description, no author.
Cheers,
Richard
> .../systemtap/tapset-linux-sendfile-syscall.patch | 12 ++++++++++++
> meta/recipes-kernel/systemtap/systemtap_git.inc | 1 +
> 2 files changed, 13 insertions(+)
> create mode 100644 meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
>
> diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
> new file mode 100644
> index 0000000..b42ab3c
> --- /dev/null
> +++ b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
> @@ -0,0 +1,12 @@
> +diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp
> +--- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500
> ++++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500
> +@@ -1953,7 +1953,7 @@
> + # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd,
> + # compat_loff_t __user *, offset, compat_size_t, count)
> + #
> +-probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile
> ++probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ?
> + {
> + name = "sendfile"
> + out_fd = __int32($out_fd)
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
> index 717d66f..3e1e80a 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.inc
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
> @@ -6,6 +6,7 @@ PV = "2.5+git${SRCPV}"
> SRC_URI = "git://sourceware.org/git/systemtap.git \
> file://docproc-build-fix.patch \
> file://obsolete_automake_macros.patch \
> + file://tapset-linux-sendfile-syscall.patch \
> "
>
> # systemtap doesn't support mips
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] systemtap: Fixed probe syscall.sendfile failure
@ 2014-09-03 8:14 Muzaffar Mahmood
0 siblings, 0 replies; 3+ messages in thread
From: Muzaffar Mahmood @ 2014-09-03 8:14 UTC (permalink / raw)
To: openembedded-core
From: Mikhail Durnev <mikhail_durnev@mentor.com>
Marked __syscall.compat_sendfile as optional
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Muzaffar Mahmood <muzaffar_mahmood@mentor.com>
---
.../systemtap/tapset-linux-sendfile-syscall.patch | 22 ++++++++++++++++++++
meta/recipes-kernel/systemtap/systemtap_git.inc | 1 +
2 files changed, 23 insertions(+)
create mode 100644 meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
new file mode 100644
index 0000000..f945760
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
@@ -0,0 +1,22 @@
+systemtap: Fixed probe syscall.sendfile failure
+
+compat_sendfile syscall is unavailable in kernels starting version 3.8.
+Hence systemtap scripts like 'probe syscall.* { if (target()==pid()) log(name." ".argstr) }' fail.
+This problem is solved by marking __syscall.compat_sendfile as optional in tapset/linux/syscalls2.stp
+
+Upstream-Status: Pending
+
+Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
+
+diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp
+--- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500
++++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500
+@@ -1953,7 +1953,7 @@
+ # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd,
+ # compat_loff_t __user *, offset, compat_size_t, count)
+ #
+-probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile
++probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ?
+ {
+ name = "sendfile"
+ out_fd = __int32($out_fd)
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 717d66f..3e1e80a 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -6,6 +6,7 @@ PV = "2.5+git${SRCPV}"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
+ file://tapset-linux-sendfile-syscall.patch \
"
# systemtap doesn't support mips
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-03 8:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 10:17 [PATCH] systemtap: Fixed probe syscall.sendfile failure Muzaffar Mahmood
2014-08-28 10:33 ` Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2014-09-03 8:14 Muzaffar Mahmood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox