Re: [PATCH] Re: your dm patch for strace

2016-10-05 Thread Masatake YAMATO
I tested the patch and it works fine. Could you add following patch if you approve? commit bae7528fa92283726caac1ec7a6c306274f8899d Author: Masatake YAMATO Date: Mon Aug 22 17:44:55 2016 +0900 dm-ioctl: add a lvm private flag When I run "dmsetup ls" under dm-ioctl patc

Re: [PATCH] device mapper ioctl

2016-11-10 Thread Masatake YAMATO
https://github.com/strace/strace/commit/a507a0bb777c552e43e1e45f302703a09ffea1b8 > Could you please review it and let us know if there are any issues? It works fine on my Fedora 24(x86_64). "make check" says "PASS" about ioctl_dm.test and ioctl_dm-v.test. Very useful. Thank you. Masatake YAMATO >

Re: [strace-4.15] Proposal: Output Staging for -z Option (print successful syscalls only) / Patch included

2017-01-17 Thread Masatake YAMATO
Hi, > Output Staging for -z Option (print successful syscalls only) / Patch included Interesting idea, but I want logically reversed case: -z! Option (print syscalls returning error), too. Masatake YAMATO -- Check

Re: [strace-4.15] Proposal: Output Staging for -z Option (print successful syscalls only) / Patch included

2017-01-17 Thread Masatake YAMATO
> Hi Yamato, > > Would a -Z option (inverse -z) be o.k? Combining both -zZ will print > non-returning syscalls only. -z! is just my random idea. -Z may be o.k. Dmitry may answer this. Masatake YAMATO > > Regards, > Burkhard > > -Original Message----- > Fro

Re: Using regular expression filter system call

2017-04-09 Thread Masatake YAMATO
^dup, @^send, > @^recv, @^read, @^write, @^sem, @^shm, @^msg, @^inotify, @^pkey_ How about '/' (slash)? vi and sed users may be familiar with the notation. Masatake YAMATO > diff --git a/qualify.c b/qualify.c > index 157d313..5753530 100644 > --- a/qualify.c > +++ b/quali

Re: Introducing new filtering architecture.

2017-06-04 Thread Masatake YAMATO
ption. It is nice that -k own filtering rule can be defined. Masatake YAMATO On Sun, 4 Jun 2017 13:15:05 +0700, Nikolay Marchuk wrote: > Hello, > This message describes new filtering architecture. Please, review it and > give me feedback. > > Filtering language. > The

Re: [PATCH] netlink: add type decoding

2017-06-06 Thread Masatake YAMATO
o, great work! I have really wanted this. Do you have a plan to work on decoding NETLINK_GENERIC? I'm interested in the area. If you don't have a plan, I would like to finish the following stub. Masatake YAMATO diff --git a/netlink.c b/netlink.c index f9ff465..215807a 100644 --- a/netlink.

Re: [PATCH] netlink: add type decoding

2017-06-08 Thread Masatake YAMATO
>> Masatake YAMATO >> >> diff --git a/netlink.c b/netlink.c >> index f9ff465..215807a 100644 >> --- a/netlink.c >> +++ b/netlink.c >> @@ -110,6 +110,26 @@ static const struct { >> [NETLINK_XFRM] = { nl_xfrm_types, "XFRM_MSG_???" }

[PATCH 2/6] socketeutils: allow to pass a user data to the callback function of receive_responses()

2017-06-09 Thread Masatake YAMATO
ink_get): Cast statically given the protocol name to `void *' to pass it to the call back function. (inet_parse_response,unix_parse_response,netlink_parse_response): Introduce a local variable `proto_name' to convert the data type of argument from `void *' to `const char*'.

[PATCH 0/6] Decode family field of Netlink GENERIC protocol

2017-06-09 Thread Masatake YAMATO
to Linux kernel. When strace detects such action of the target process, strace should extend the table for decoding the family id of the newly registered subsystem. Masatake YAMATO (6): socketeutils: extend receive_responses() to handle other type than SOCK_DIAG_BY_FAMILY communication

[PATCH 6/6] tests: add check for decoding family field of netlink GENERIC protocol

2017-06-09 Thread Masatake YAMATO
* tests/netlink_generic.c: New file. * tests/gen_tests.in: Add netlink_generic. * pure_executables.list: Add netlink_generic.. Signed-off-by: Masatake YAMATO --- tests/.gitignore| 1 + tests/gen_tests.in | 1 + tests/netlink_generic.c | 78

[PATCH 5/6] netlink: decode "family" field of Netlink GENERIC protocol

2017-06-09 Thread Masatake YAMATO
-time. Add an element for NETLINK_GENERIC. (decode_nlmsg_type): Install the xlat table to the NETLINK_GENERIC element of nlmsg_types. Signed-off-by: Masatake YAMATO --- netlink.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/netlink.c b/netlink.c index 049843d..d

[PATCH 3/6] dyxlat: building xlat dynamically

2017-06-09 Thread Masatake YAMATO
lding xlat in run-time. Decoding the field is the primary use case of functions but they can be used another purpose. * defs.h (dyxlat_new, dyxlat_delete, dyxlat_may_add_pair): New functions declarations. (struct dyxlat): New opaque data type. * dyxlat.c: New file. Signed-off-by: Masatake Y

[PATCH 4/6] socketutils: build a xlat table dynamically for decoding "family" field of Netlink GENERIC protocol

2017-06-09 Thread Masatake YAMATO
* socketutils.c (genl_families_xlat): exported function for building the xlat table. Include linux/genetlink.h. * defs.h (genl_families_xlat): add the declaration. (genl_send_dump_families, genl_parse_families_response): helper functions. Signed-off-by: Masatake YAMATO --- defs.h| 3

[PATCH 1/6] socketeutils: extend receive_responses() to handle other type than SOCK_DIAG_BY_FAMILY communication

2017-06-09 Thread Masatake YAMATO
n. Signed-off-by: Masatake YAMATO --- socketutils.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/socketutils.c b/socketutils.c index a3aedb4..3292c2e 100644 --- a/socketutils.c +++ b/socketutils.c @@ -189,6 +189,7 @@ inet_parse_response(const char *const proto_n

[PATCH v2 4/6] socketutils: build a xlat table dynamically for decoding "family" field of Netlink GENERIC protocol

2017-06-11 Thread Masatake YAMATO
* socketutils.c (genl_families_xlat): exported function for building the xlat table. Include linux/genetlink.h. * defs.h (genl_families_xlat): add the declaration. (genl_send_dump_families, genl_parse_families_response): helper functions. Signed-off-by: Masatake YAMATO --- defs.h| 3

[PATCH v2 1/6] socketeutils: extend receive_responses() to handle other type than SOCK_DIAG_BY_FAMILY communication

2017-06-11 Thread Masatake YAMATO
n. Signed-off-by: Masatake YAMATO --- socketutils.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/socketutils.c b/socketutils.c index a3aedb4..f86acad 100644 --- a/socketutils.c +++ b/socketutils.c @@ -189,6 +189,7 @@ inet_parse_response(const char *const

[PATCH v2 2/6] socketeutils: allow to pass a user data to the callback function of receive_responses()

2017-06-11 Thread Masatake YAMATO
ink_get): Cast statically given the protocol name to `void *' to pass it to the call back function. (inet_parse_response,unix_parse_response,netlink_parse_response): Introduce a local variable `proto_name' to convert the data type of argument from `void *' to `const char*'.

[PATCH v2 0/6] Decode family field of Netlink GENERIC protocol

2017-06-11 Thread Masatake YAMATO
cript. Suggested by Dmitry V. Levin . * keep NETLINK_* entries in nlmsg_types sorted. Suggested by JingPiao Chen . * Add tests/.gitignore to 6/6 change log. Suggested by JingPiao Chen . Masatake YAMATO (6): socketeutils: extend receive_responses() to handle other

[PATCH v2 6/6] tests: add check for decoding family field of netlink GENERIC protocol

2017-06-11 Thread Masatake YAMATO
* tests/netlink_generic.c: New file. * tests/gen_tests.in: Add netlink_generic. * pure_executables.list: Likewise. * tests/.gitignore: Add netlink_generic. Signed-off-by: Masatake YAMATO --- tests/.gitignore| 1 + tests/gen_tests.in | 1 + tests/netlink_generic.c

[PATCH v2 5/6] netlink: decode "family" field of Netlink GENERIC protocol

2017-06-11 Thread Masatake YAMATO
-time. Add an element for NETLINK_GENERIC. (decode_nlmsg_type): Install the xlat table to the NETLINK_GENERIC element of nlmsg_types. Signed-off-by: Masatake YAMATO --- netlink.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/netlink.c b/netlink.c index 049843d..5

[PATCH v2 3/6] dyxlat: building xlat dynamically

2017-06-11 Thread Masatake YAMATO
lding xlat in run-time. Decoding the field is the primary use case of functions but they can be used another purpose. * defs.h (dyxlat_new, dyxlat_delete, dyxlat_may_add_pair): New functions declarations. (struct dyxlat): New opaque data type. * dyxlat.c: New file. Signed-off-by: Masatake Y

[PATCH v3 1/5] dyxlat: building xlat dynamically

2017-06-13 Thread Masatake YAMATO
Merge the file static functions in dyxlat.c to the exported functions in the file. Signed-off-by: Masatake YAMATO --- Makefile.am | 1 + defs.h | 6 dyxlat.c| 103 3 files changed, 110 insertions(+) create

[PATCH v3 0/5] Decode family field of Netlink GENERIC protocol

2017-06-13 Thread Masatake YAMATO
* Add tests/.gitignore to 6/6 change log. Suggested by JingPiao Chen . Masatake YAMATO (5): dyxlat: building xlat dynamically Introduce xstrndup function socketutils: build a xlat table dynamically for decoding "family" field of Netlink GENERIC protocol netlink:

[PATCH v3 4/5] netlink: decode "family" field of Netlink GENERIC protocol

2017-06-13 Thread Masatake YAMATO
-time. Add an element for NETLINK_GENERIC. (decode_nlmsg_type): Install the xlat table to the NETLINK_GENERIC element of nlmsg_types. Signed-off-by: Masatake YAMATO --- netlink.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/netlink.c b/netlink.c index 049843d..5

[PATCH v3 5/5] tests: add check for decoding family field of netlink GENERIC protocol

2017-06-13 Thread Masatake YAMATO
* tests/netlink_generic.c: New file. * tests/gen_tests.in: Add netlink_generic. * pure_executables.list: Likewise. * tests/.gitignore: Add netlink_generic. Signed-off-by: Masatake YAMATO --- tests/.gitignore| 1 + tests/gen_tests.in | 1 + tests/netlink_generic.c

[PATCH v3 3/5] socketutils: build a xlat table dynamically for decoding "family" field of Netlink GENERIC protocol

2017-06-13 Thread Masatake YAMATO
r for storing family name even if it is not stored to dyxlat. Signed-off-by: Masatake YAMATO --- configure.ac | 1 + defs.h| 2 ++ socketutils.c | 110 ++ 3 files changed, 113 insertions(+) diff --git a/configure

[PATCH v3 2/5] Introduce xstrndup function

2017-06-13 Thread Masatake YAMATO
* defs.h (xstrndup): New prototypes. * xmalloc.c (xstrndup): New function. Signed-off-by: Masatake YAMATO --- defs.h| 1 + xmalloc.c | 12 2 files changed, 13 insertions(+) diff --git a/defs.h b/defs.h index 52f40b3..063394e 100644 --- a/defs.h +++ b/defs.h @@ -398,6 +398,7

Re: [PATCH v3 1/5] dyxlat: building xlat dynamically

2017-06-16 Thread Masatake YAMATO
On Wed, 14 Jun 2017 00:55:03 +0300, "Dmitry V. Levin" wrote: > On Tue, Jun 13, 2017 at 05:26:41PM +0900, Masatake YAMATO wrote: >> xlat tables are generating in built-time of strace. >> >> printxval is suitable for printing `family' field of Netlink GENERIC &

[PATCH v4 3/5] socketutils: build a xlat table dynamically for decoding "family" name of Netlink GENERIC protocol

2017-06-18 Thread Masatake YAMATO
new dyxlat interface. Signed-off-by: Masatake YAMATO --- configure.ac | 1 + defs.h| 2 ++ socketutils.c | 108 ++ 3 files changed, 111 insertions(+) diff --git a/configure.ac b/configure.ac index 9bf89fc..ff9c7c5 100644 --- a/co

[PATCH v4 2/5] dyxlat: building xlat dynamically

2017-06-18 Thread Masatake YAMATO
xtend the array when "used" is equal to greater than "allocated". Update the xlat element before incrmenting "used" field. Signed-off-by: Masatake YAMATO --- Makefile.am | 1 + defs.h | 6 dyxlat.c| 103 +

[PATCH v4 4/5] netlink: decode family name of Netlink GENERIC protocol

2017-06-18 Thread Masatake YAMATO
e this log to clear the relationship between an integer for "family" and "type" field. Signed-off-by: Masatake YAMATO --- netlink.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/netlink.c b/netlink.c index 4bef949..ff837f4 100644 --- a/

[PATCH v4 5/5] tests: add check for decoding family name of netlink GENERIC protocol

2017-06-18 Thread Masatake YAMATO
. * Don't specify NUM_F_ACK. Signed-off-by: Masatake YAMATO --- tests/.gitignore| 1 + tests/gen_tests.in | 1 + tests/netlink_generic.c | 89 + tests/pure_executables.list | 1 + 4 files changed, 92 insertions(+) create mode 1

[PATCH v4 1/5] Introduce xstrndup function

2017-06-18 Thread Masatake YAMATO
* defs.h (xstrndup): New prototype. * xmalloc.c (xstrndup): New function. * configure.ac (AC_CHECK_FUNC): check the avaiabllity of strndup. Changes in version 4 (suggested by ldv): * Use strndup if available. * Fix a typo in log. Signed-off-by: Masatake YAMATO --- configure.ac

Re: strace 4.18 released

2017-07-05 Thread Masatake YAMATO
ous area of linux for me. JingPiao Chen (and Fabien Siron), thank you very much. Masatake YAMATO -- Check out the vibrant tech community on one of the world's most engaging tech sites,

Re: [PATCH v6 9/9] Add stacktrace filter action

2017-08-02 Thread Masatake YAMATO
_RESTORER, sa_restorer=0x7fe71f385950}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fe71f385950}, {sa_handler=SIG_DFL, sa_mask=[] ... Masatake YAMATO > * defs.h (QUAL_STACKTRACE): A

[PATCH 4/8] kvm: decode the argument for KVM_CREATE_VCPU ioctl command

2017-11-30 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VCPU. (kvm_ioctl_create_vcpu): New function. Signed-off-by: Masatake YAMATO --- kvm.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kvm.c b/kvm.c index fdcf3466..1b21dab5 100644 --- a/kvm.c +++ b/kvm.c @@ -43,10 +43,21

[PATCH 5/8] kvm: decode the argument for KVM_SET_USER_MEMORY_REGION ioctl command

2017-11-30 Thread Masatake YAMATO
* xlat/kvm_mem_flags.in: New file. * kvm.c (kvm_ioctl): Handle KVM_SET_USER_MEMORY_REGION. (kvm_ioctl_set_user_memory_region): New function. (top-level): Include print_fields.h and xlat/kvm_mem_flags.h. Signed-off-by: Masatake YAMATO --- kvm.c | 22 ++ xlat

[PATCH 3/8] kvm: handle KVM_CREATE_VM ioctl command

2017-11-30 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VM. (kvm_ioctl_create_vm): New function. Signed-off-by: Masatake YAMATO --- kvm.c | 13 + 1 file changed, 13 insertions(+) diff --git a/kvm.c b/kvm.c index 9fa7e248..fdcf3466 100644 --- a/kvm.c +++ b/kvm.c @@ -33,10 +33,23 @@ #ifdef

[PATCH 7/8] kvm: decode the argument for KVM_{SET, GET}_SREGS ioctl command

2017-11-30 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_SET_SREGS and KVM_GET_SREGES. (kvm_ioctl_decode_sregs): New function. (kvm_ioctl_decode_regs_dtable): New function. (kvm_ioctl_decode_regs_segment): New function. Signed-off-by: Masatake YAMATO --- kvm.c | 82

[PATCH 1/8] ioctl: add a stub for decoding kvm related ioctls

2017-11-30 Thread Masatake YAMATO
* kvm.c: New file. * Makefile.am (strace_SOURCES): Add kvm.c. * configure.ac: Check the existence of linux/kvm.h. * defs.h: Declare `kvm' as ioctl doecoder. * ioctl.c: Call `kvm_ioctl'. Signed-off-by: Masatake YAMATO --- Makefile.am | 1 + configure.ac | 1 + defs.h | 1

[PATCH 6/8] kvm: decode the argument for KVM_{SET, GET}_REGS ioctl command

2017-11-30 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_SET_REGS and KVM_GET_REGES. (kvm_ioctl_decode_regs): New function. Signed-off-by: Masatake YAMATO --- kvm.c | 52 1 file changed, 52 insertions(+) diff --git a/kvm.c b/kvm.c index 43746fef..69a8c97a 100644

[PATCH 2/8] kvm: handle KVM_RUN and KVM_GET_VCPU_MMAP_SIZE, and KVM_GET_API_VERSION ioctl commands

2017-11-30 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_RUN, KVM_GET_VCPU_MMAP_SIZE and KVM_GET_API_VERSION. Signed-off-by: Masatake YAMATO --- kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/kvm.c b/kvm.c index 8251ce7d..9fa7e248 100644 --- a/kvm.c +++ b/kvm.c @@ -37,6 +37,10 @@ int kvm_ioctl(struct

[PATCH 8/8] tests: check KVM ioctl commands decoding

2017-11-30 Thread Masatake YAMATO
* tests/Makefile.am: Add ioctl_kvm. * tests/ioctl_kvm.c: New test target file. Taken from https://lwn.net/Articles/658512/. * tests/ioctl_kvm.expected: New expected file. * tests/ioctl_kvm.test: New test driver. --- tests/Makefile.am| 1 + tests/ioctl_kvm.c| 152 +++

[PATCH 3/8] kvm: handle KVM_CREATE_VM ioctl command

2017-12-01 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VM. Change in v2: * Don't make a redundant separated function. Suggested by ldv. Signed-off-by: Masatake YAMATO --- kvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kvm.c b/kvm.c index 24a37ace..7497788e 100644 --- a/kvm.c +++ b/

[PATCH 4/8] kvm: decode the argument for KVM_CREATE_VCPU ioctl command

2017-12-01 Thread Masatake YAMATO
* kvm.c (kvm_ioctl_create_vcpu): New function. (kvm_ioctl) : Use it. Signed-off-by: Masatake YAMATO --- kvm.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kvm.c b/kvm.c index 7497788e..f725f9df 100644 --- a/kvm.c +++ b/kvm.c @@ -33,10 +33,21 @@ #ifdef HAVE_LINUX_KVM_H

[PATCH 2/8] kvm: handle KVM_RUN and KVM_GET_VCPU_MMAP_SIZE, and KVM_GET_API_VERSION ioctl commands

2017-12-01 Thread Masatake YAMATO
* kvm.c (kvm_ioctl): Handle KVM_RUN, KVM_GET_VCPU_MMAP_SIZE and KVM_GET_API_VERSION. Change in v2: * Remove a pointless comment. Suggested by ldv. Signed-off-by: Masatake YAMATO --- kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kvm.c b/kvm.c index ebd6be7b..24a37ace 100644

[PATCH 6/8] kvm: decode the argument for KVM_{SET, GET}_REGS ioctl command

2017-12-01 Thread Masatake YAMATO
available. * Introduce files in which arch-specific and generic stub decoders are defined. Use them from kvm_ioctl_decode_regs. * Use umove_or_printaddr instead of umove. All items are suggested by ldv. Signed-off-by: Masatake YAMATO --- configure.ac| 2 ++ kvm.c

[PATCH 1/8] ioctl: add a stub for decoding kvm related ioctls

2017-12-01 Thread Masatake YAMATO
* kvm.c: New file. * Makefile.am (strace_SOURCES): Add kvm.c. * configure.ac (AC_CHECK_HEADERS): Add linux/kvm.h. * defs.h: Declare `kvm' as ioctl doecoder. * ioctl.c: Call `kvm_ioctl'. Change in v2: * Remove default kvm_ioctl() implementation. Suggested by ldv. Signed-off-by: Masat

[PATCH 8/8] tests: check KVM ioctl commands decoding

2017-12-01 Thread Masatake YAMATO
* tests/Makefile.am: Add ioctl_kvm. * tests/ioctl_kvm.c: New test target file. Taken from https://lwn.net/Articles/658512/. * tests/ioctl_kvm.expected: New expected file. * tests/ioctl_kvm.test: New test driver. Changes in v2: * Skip the test case if kvm.h is not available. * Skip the test case

[PATCH 7/8] kvm: decode the argument for KVM_{SET, GET}_SREGS ioctl command

2017-12-01 Thread Masatake YAMATO
. (kvm_ioctl_decode_regs_segment): Ditto. Changes in v2: * Decode only if struct kvm_sregs is available. * Put arch-specific and generic stub decoders to arch_kvm.c. * Use umove_or_printaddr instead of umove. Above 3 items are suggested by ldv. * Use more const modifiers. Signed-off-by: Masatake

[PATCH 5/8] kvm: decode the argument for KVM_SET_USER_MEMORY_REGION ioctl command

2017-12-01 Thread Masatake YAMATO
prints the zero address nicely. Suggested by ldv. Signed-off-by: Masatake YAMATO --- kvm.c | 23 +++ xlat/kvm_mem_flags.in | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 xlat/kvm_mem_flags.in diff --git a/kvm.c b/kvm.c index f725f9df..19779c84

Re: [PATCH 1/8] ioctl: add a stub for decoding kvm related ioctls

2017-12-01 Thread Masatake YAMATO
I'm sorry that I don't put "PATCH v2" to the subjects. Masatake YAMATO > * kvm.c: New file. > * Makefile.am (strace_SOURCES): Add kvm.c. > * configure.ac (AC_CHECK_HEADERS): Add linux/kvm.h. > * defs.h: Declare `kvm' as ioctl doecoder. > * ioctl.c: Call `k

Re: [PATCH 4/8] kvm: decode the argument for KVM_CREATE_VCPU ioctl command

2017-12-02 Thread Masatake YAMATO
Thank you. I will revise the rest changes. Masatake YAMATO > On Sat, Dec 02, 2017 at 04:05:28AM +0900, Masatake YAMATO wrote: >> * kvm.c (kvm_ioctl_create_vcpu): New function. >> (kvm_ioctl) : Use it. > > I've merged the first 4 commits,

[PATCH v3 1/4] kvm: decode the argument for KVM_SET_USER_MEMORY_REGION ioctl command

2017-12-04 Thread Masatake YAMATO
because umove_or_printaddr performs verbose(tcp) check and prints the zero address nicely. Suggested by ldv. Change in v3: * Verify the availability struct kvm_userspace_memory_region. Suggested by ldv. Signed-off-by: Masatake YAMATO --- configure.ac | 2 ++ kvm.c

[PATCH v3 2/4] kvm: decode the argument for KVM_{SET, GET}_REGS ioctl command

2017-12-04 Thread Masatake YAMATO
k the existence of struct kvm_regs. We assume we can rely on struct kvm_regs being available. Suggested by ldv. * Add linux/x32/arch_kvm.c. * Add new files to EXTRA_DIST. All items are suggested by ldv. Signed-off-by: Masatake YAMATO --- Makefile.am | 3 +++ configure.ac

[PATCH v3 4/4] tests: check KVM ioctl commands decoding

2017-12-04 Thread Masatake YAMATO
* tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm. (DECODER_TESTS): Add ioctl_kvm.test. (EXTRA_DIST): Add ioctl_kvm.expected. * tests/ioctl_kvm.c: New test target file. Taken from https://lwn.net/Articles/658512/. * tests/ioctl_kvm.expected: New expected file. * tests/ioctl_kvm.test: New test d

[PATCH v3 3/4] kvm: decode the argument for KVM_{SET, GET}_SREGS ioctl command

2017-12-04 Thread Masatake YAMATO
guards around codes using kvm_sregs. Suggested by ldv. Signed-off-by: Masatake YAMATO --- configure.ac| 4 ++- kvm.c | 23 + linux/arch_kvm.c| 10 +++ linux/x86_64/arch_kvm.c | 69 + 4

Re: [PATCH v3 1/4] kvm: decode the argument for KVM_SET_USER_MEMORY_REGION ioctl command

2017-12-04 Thread Masatake YAMATO
On Mon, 4 Dec 2017 14:23:14 +0300, "Dmitry V. Levin" wrote: > On Mon, Dec 04, 2017 at 08:04:49PM +0900, Masatake YAMATO wrote: >> * configure.ac (AC_CHECK_TYPES): Add struct kvm_userspace_memory_region. >> * xlat/kvm_mem_flags.in: New file. >> * kvm.c:

[PATCH v4 1/4] kvm: decode the argument for KVM_SET_USER_MEMORY_REGION ioctl command

2017-12-04 Thread Masatake YAMATO
HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION. Suggested by ldv. Signed-off-by: Masatake YAMATO --- configure.ac | 2 ++ kvm.c | 30 ++ xlat/kvm_mem_flags.in | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 xlat/kvm_mem_flags.in diff --git a/configure.ac b/configure.ac

[PATCH v4 3/4] kvm: decode the argument for KVM_{SET, GET}_SREGS ioctl command

2017-12-04 Thread Masatake YAMATO
/. * Introduce PRINT_FIELD_KVM_SREGS_STRUCT macro for simplifying the code for decoding sregs. Signed-off-by: Masatake YAMATO --- configure.ac| 5 ++-- kvm.c | 24 + linux/arch_kvm.c| 11 linux/x86_64/arch_kvm.c | 72

[PATCH v4 4/4] tests: check KVM ioctl commands decoding

2017-12-04 Thread Masatake YAMATO
* tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm. (DECODER_TESTS): Add ioctl_kvm.test. (EXTRA_DIST): Add ioctl_kvm.expected. * tests/ioctl_kvm.c: New test target file. Taken from https://lwn.net/Articles/658512/. * tests/ioctl_kvm.expected: New expected file. * tests/ioctl_kvm.test: New test d

[PATCH v4 2/4] kvm: decode the argument for KVM_{SET, GET}_REGS ioctl command

2017-12-04 Thread Masatake YAMATO
g a new file to the lists in Makefile.am. * Sort when adding a new type to the AC_CHECK_TYPES. All items are suggested by ldv. Signed-off-by: Masatake YAMATO --- Makefile.am | 3 +++ configure.ac| 5 - kvm.c | 24 l

[RFC 2/2] Unwind: demangle symbol names

2017-12-05 Thread Masatake YAMATO
This patch is for demangling c++ symbols appeared in strack traces with using cplus_demangle in GNU libiberty library, I'm not sure this is acceptable or not because this change introdues a depedency to a GPLv3+ library to strace. This is an example of output of demangled stack trace: fstat(5, {

[RFC 1/2] Rename xmalloc and xcalloc to strace_malloc and strace_calloc

2017-12-05 Thread Masatake YAMATO
I'm planning to linke strace with libiberty for mangling C++ symbol appearted in stack trace enabled with -k option. Both the names, xmalloc and xcalloc, are already used in the library. Therefore I rename the symbols defined in strace. --- bpf.c| 2 +- count.c | 4 ++-- dyxl

Re: [RFC 2/2] Unwind: demangle symbol names

2017-12-07 Thread Masatake YAMATO
On Tue, 5 Dec 2017 13:59:17 +0300, "Dmitry V. Levin" wrote: > On Tue, Dec 05, 2017 at 07:01:03PM +0900, Masatake YAMATO wrote: >> This patch is for demangling c++ symbols appeared in strack traces >> with using cplus_demangle in GNU libiberty library, >> >> I

[PATCH v5 4/4] tests: check KVM ioctl commands decoding

2017-12-07 Thread Masatake YAMATO
* tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm. (DECODER_TESTS): Add ioctl_kvm.test. (EXTRA_DIST): Add ioctl_kvm.expected. * tests/ioctl_kvm.c: New test target file. Taken from https://lwn.net/Articles/658512/. * tests/ioctl_kvm.expected: New expected file. * tests/ioctl_kvm.test: New test d

[PATCH v5 3/4] kvm: decode the argument for KVM_{SET, GET}_SREGS ioctl command

2017-12-07 Thread Masatake YAMATO
/. * Introduce PRINT_FIELD_KVM_SREGS_STRUCT macro for simplifying the code for decoding sregs. Changes in v5: * Don't return RVAL_DECODED if the decoder prints something. Suggested by ldv. Signed-off-by: Masatake YAMATO --- configure.ac| 5 ++-- kvm.c

[PATCH v5 2/4] kvm: decode the argument for KVM_{SET, GET}_REGS ioctl command

2017-12-07 Thread Masatake YAMATO
ldv. Signed-off-by: Masatake YAMATO --- Makefile.am | 3 +++ configure.ac| 5 - kvm.c | 23 +++ linux/arch_kvm.c| 9 + linux/i386/arch_kvm.c | 1 + linux/x32/arch_kvm.c| 1 + linux/x8

[PATCH v5 1/4] kvm: decode the argument for KVM_SET_USER_MEMORY_REGION ioctl command

2017-12-07 Thread Masatake YAMATO
HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION. Suggested by ldv. Change in v5: * Added missing closing curly bracket. Signed-off-by: Masatake YAMATO --- configure.ac | 2 ++ kvm.c | 31 +++ xlat/kvm_mem_flags.in | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 xlat

Re: [PATCH v4 4/4] tests: check KVM ioctl commands decoding

2017-12-07 Thread Masatake YAMATO
On Thu, 7 Dec 2017 17:04:05 +0300, "Dmitry V. Levin" wrote: > On Mon, Dec 04, 2017 at 10:08:17PM +0900, Masatake YAMATO wrote: >> * tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm. >> (DECODER_TESTS): Add ioctl_kvm.test. >> (EXTRA_DIST): Add ioctl_kvm.expected. &

Re: [PATCH v4 4/4] tests: check KVM ioctl commands decoding

2017-12-07 Thread Masatake YAMATO
On Thu, 7 Dec 2017 17:18:50 +0300, "Dmitry V. Levin" wrote: > On Thu, Dec 07, 2017 at 11:14:34PM +0900, Masatake YAMATO wrote: >> On Thu, 7 Dec 2017 17:04:05 +0300, "Dmitry V. Levin" >> wrote: >> > On Mon, Dec 04, 2017 at 10:08:17PM +0900, Masa

[PATCH 1/2] Define macros for renaming xmalloc and xcalloc

2017-12-17 Thread Masatake YAMATO
c and strace_malloc) rename the names defined in strace side for avoiding the confliction. * xmalloc.h (strace_calloc, strace_malloc): New macros. Signed-off-by: Masatake YAMATO --- xmalloc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmalloc.h b/xmalloc.h index d1feeb91..89234e20 100644

[PATCH 2/2] Unwind: demangle symbol names

2017-12-17 Thread Masatake YAMATO
nded to strace_LDFLAGS if USE_DEMANGLE is defined. (libiberty_LDADD): New macro appended to strace_LIBS if USE_DEMANGLE is defined. * configure.ac : Add --with-libiberty optoin. Check libiberty support. * unwind.c: Include demangle.h. (print_stack_frame): Call cplus_demangle. Sig

Re: [PATCH 1/2] Define macros for renaming xmalloc and xcalloc

2017-12-25 Thread Masatake YAMATO
Hi, I have NO intent to hurry you but IF you miss follow two patches, could you look at them? * [PATCH 1/2] Define macros for renaming xmalloc and xcalloc * [PATCH 2/2] Unwind: demangle symbol names Rewgards, Masatake YAMATO On Mon, 18 Dec 2017 13:24:54 +0900, Masatake YAMATO wrote: >

[PATCH 1/8] unwind: lift up unw_flush_cache from mmap cache management code

2018-01-26 Thread Masatake YAMATO
. * unwind.c (MMAP_CACHE_REBUILD_*): New enum. (rebuild_cache_if_invalid): Return MMAP_CACHE_REBUILD_* instead of bool value. (build_mmap_cache): Don't call unw_flush_cache here. (unwind_print_stacktrace, unwind_capture_stacktrace): Call unw_flush_cache here instead. Signed-off-by: Masatake Y

[PATCH 3/8] mmap_cache: Move code for searching an mmap cache from unwind

2018-01-26 Thread Masatake YAMATO
stand-alone function named mmap_cache_search. * defs.h (mmap_cache_search): New function derived from print_stack_frame. * mmap_cached.c (mmap_cache_search): The implementation of the new function. * unwind.c (print_stack_frame): Use the new function. Signed-off-by: Masatake YAMATO --- defs.h

[PATCH 2/8] Introduce mmap_cache subsystem derived from unwind.c

2018-01-26 Thread Masatake YAMATO
m unwind.c. * unwind.c: remove mmap_cache implementation. * syscall.c: call a function for invalidating mmap cache with new name. Signed-off-by: Masatake YAMATO --- Makefile.am | 1 + defs.h | 31 +- mmap_cache.c | 183 ++

[PATCH 4/8] mmap_cache: record protection bits

2018-01-26 Thread Masatake YAMATO
t are not executable here. Signed-off-by: Masatake YAMATO --- defs.h | 9 + mmap_cache.c | 27 ++- unwind.c | 4 +++- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/defs.h b/defs.h index a653c852..093acc3f 100644 --- a/defs.h +++ b/d

[PATCH 5/8] Lift up mmap_cache_delete invocation from unwind.c

2018-01-26 Thread Masatake YAMATO
(unwind_tcb_fin): Don't call mmap_cache_delete. Signed-off-by: Masatake YAMATO --- strace.c | 2 ++ unwind.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/strace.c b/strace.c index 0ee9b5e3..6ea1765a 100644 --- a/strace.c +++ b/strace.c @@ -782,6 +782,8 @@ droptcb(struct tcb

[PATCH 0/8] mmap_cache subsystem (re-factoring)

2018-01-26 Thread Masatake YAMATO
is useful for other purposes than unwinding feature. This patch set makes the code for caching usable independently of unwinding feature. In the changes, I call the newly separated code for caching "mmap_cache subsystem". [1] https://marc.info/?l=kvm&m=151531408406144&w=2

[PATCH 8/8] mmap_cache: add customizable search function

2018-01-26 Thread Masatake YAMATO
* defs.h (mmap_cache_search_custom): New function. (mmap_cache_search_fn): New type. * mmap_cache.c (mmap_cache_search_custom): New function. Signed-off-by: Masatake YAMATO --- defs.h | 3 +++ mmap_cache.c | 12 2 files changed, 15 insertions(+) diff --git a/defs.h b/defs.h

[PATCH 6/8] mmap_cache: add function to enable mmap_cache

2018-01-26 Thread Masatake YAMATO
(syscall_exiting_decode): Use mmap_cache_is_enabled. * unwind.c (unwind_init): Call mmap_cache_enable. Signed-off-by: Masatake YAMATO --- defs.h | 2 ++ mmap_cache.c | 11 +++ syscall.c| 4 +--- unwind.c | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/defs.h b

[PATCH 7/8] mmap_cache: record device major and minor numbers

2018-01-26 Thread Masatake YAMATO
* defs.h (struct mmap_cache_t): add major and minor fields. * mmap_cache.c: record device major and minor numbers. Signed-off-by: Masatake YAMATO --- defs.h | 3 +++ mmap_cache.c | 9 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/defs.h b/defs.h index 6c5f293d

[PATCH resend 6/8] mmap_cache: add function to enable mmap_cache

2018-02-18 Thread Masatake YAMATO
(syscall_exiting_decode): Use mmap_cache_is_enabled. * unwind.c (unwind_init): Call mmap_cache_enable. Signed-off-by: Masatake YAMATO --- defs.h | 2 ++ mmap_cache.c | 11 +++ syscall.c| 4 +--- unwind.c | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/defs.h b

[PATCH resend 1/8] unwind: lift up unw_flush_cache from mmap cache management code

2018-02-18 Thread Masatake YAMATO
. * unwind.c (MMAP_CACHE_REBUILD_*): New enum. (rebuild_cache_if_invalid): Return MMAP_CACHE_REBUILD_* instead of bool value. (build_mmap_cache): Don't call unw_flush_cache here. (unwind_print_stacktrace, unwind_capture_stacktrace): Call unw_flush_cache here instead. Signed-off-by: Masatake Y

[PATCH resend 4/8] mmap_cache: record protection bits

2018-02-18 Thread Masatake YAMATO
t are not executable here. Signed-off-by: Masatake YAMATO --- defs.h | 9 + mmap_cache.c | 27 ++- unwind.c | 4 +++- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/defs.h b/defs.h index 1081a962..f49d6f56 100644 --- a/defs.h +++ b/d

[PATCH resend 8/8] mmap_cache: add customizable search function

2018-02-18 Thread Masatake YAMATO
* defs.h (mmap_cache_search_custom): New function. (mmap_cache_search_fn): New type. * mmap_cache.c (mmap_cache_search_custom): New function. Signed-off-by: Masatake YAMATO --- defs.h | 3 +++ mmap_cache.c | 12 2 files changed, 15 insertions(+) diff --git a/defs.h b/defs.h

[PATCH resend 0/8] mmap_cache subsystem (re-factoring)

2018-02-18 Thread Masatake YAMATO
is useful for other purposes than unwinding feature. This patch set makes the code for caching usable independently of unwinding feature. In the changes, I call the newly separated code for caching "mmap_cache subsystem". [1] https://marc.info/?l=kvm&m=151531408406144&w=2

[PATCH resend 2/8] mmap_cache: new subsystem derived from unwind.c

2018-02-18 Thread Masatake YAMATO
m unwind.c. * unwind.c: remove mmap_cache implementation. * syscall.c: call a function for invalidating mmap cache with new name. Signed-off-by: Masatake YAMATO --- Makefile.am | 1 + defs.h | 31 +- mmap_cache.c | 185 ++

[PATCH resend 5/8] mmap_cache, unwind: lift up mmap_cache_delete invocation from unwind.c

2018-02-19 Thread Masatake YAMATO
(unwind_tcb_fin): Don't call mmap_cache_delete. Signed-off-by: Masatake YAMATO --- strace.c | 2 ++ unwind.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/strace.c b/strace.c index 10579f66..794e9a0d 100644 --- a/strace.c +++ b/strace.c @@ -803,6 +803,8 @@ droptcb(struct tcb

[PATCH resend 3/8] mmap_cache: Move code for searching an mmap cache from unwind

2018-02-19 Thread Masatake YAMATO
stand-alone function named mmap_cache_search. * defs.h (mmap_cache_search): New function derived from print_stack_frame. * mmap_cached.c (mmap_cache_search): The implementation of the new function. * unwind.c (print_stack_frame): Use the new function. Signed-off-by: Masatake YAMATO --- defs.h

[PATCH resend 7/8] mmap_cache: record device major and minor numbers

2018-02-19 Thread Masatake YAMATO
* defs.h (struct mmap_cache_t): add major and minor fields. * mmap_cache.c: record device major and minor numbers. Signed-off-by: Masatake YAMATO --- defs.h | 3 +++ mmap_cache.c | 9 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/defs.h b/defs.h index 5b42590f

Re: GSOC:Microproject

2018-02-23 Thread Masatake YAMATO
scall: removexattr - name: setxattr - syscall: setxattr - syscall: lsetxattr - syscall: fsetxattr So you can do -e trace=%xattr or -e traec=%setxattr as you want. However, I think we cannot say thie extension a microproject:-P Masatake YAMATO > On Thu, 15

Re: [RFC] print stack trace after each syscall

2013-06-25 Thread Masatake YAMATO
(I've just joined this list. So I could not set Reply-to properly.) Here is a patch I sent to the strace+ developer. It seems that this is still applicable to Luca's new patch. Masatake YAMATO Hi, I need followin

Re: [RFC] print stack trace after each syscall

2013-06-26 Thread Masatake YAMATO
> On Tue, Jun 25, 2013 at 7:08 AM, Masatake YAMATO wrote: >> Hi, >> >> I need following patch to avoid strace+ coredump. >> Could you merge it the official source tree? >> >> >> Signed-off-by: Masatake YAMATO >> >> diff --git a/syscal

Re: [PATCH] print stack trace after each syscall

2013-07-07 Thread Masatake YAMATO
How can I try this v2 patch? As far as my seeing, I cannot find the definition of print_stacktrace function. Should I apply both v1 and v2 patches? Masatake YAMATO > This patch prints the stack trace of the traced process after > each system call when using -k flag. It uses libunw

Re: [PATCHv2] print stack trace after each syscall

2013-07-08 Thread Masatake YAMATO
I've tested on Fedora 19. It works fine. BTW, I found that libunwind doesn't refer deubginfo file. So the patched strace cannot resolve symbols well. Porting debuginfo resolver from gdb to libunwind will be nice. Masatake YAMATO > This patch prints the stack trace of the traced

Re: [PATCHv2] print stack trace after each syscall

2013-07-21 Thread Masatake YAMATO
Hi, > On Mon, Jul 8, 2013 at 5:02 AM, Masatake YAMATO wrote: >> I've tested on Fedora 19. It works fine. >> >> BTW, I found that libunwind doesn't refer deubginfo file. >> So the patched strace cannot resolve symbols well. >> Porting debuginfo

Re: [PATCHv4] print stack trace after each syscall

2013-08-15 Thread Masatake YAMATO
After rebuilding libunwind with enabling minidebuginfo feature[1], your patch works fine on my Fedora 19. strace maintainer(s), is there any issue for merging the patch to the official source tree? [1] https://bugzilla.redhat.com/show_bug.cgi?id=972737 Masatake YAMATO > This patch pri

  1   2   3   4   >