From 8995d87f0c27d40d574f032bf483f6ae2b5f7375 Mon Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Thu, 17 Nov 2016 21:15:51 +0800
Subject: [PATCH] tests: add prctl-name.test, prctl-pdeathsig.test and
prctl-tsc.test
* tests/prctl-name.c:New file.
* tests/prctl-name.test: Likewise.
* tests/prctl
A wiki I collect from mailing list, I look forward to help newbies like me.
Also hope others perfect it. Thank you. Non-official, so I put it in my
[github](https://github.com/ppiao/strace-wiki), Looking forward to your reply,
Thank you.
--
JingPiao Chen
A wiki I collect from mailing list, I look forward to help newbies like me.
Also hope others perfect it. Thank you. Non-official, so I put it in my
[github](https://github.com/ppiao/strace-wiki), Looking forward to your reply,
Thank you.
--
JingPiao Chen
p 17 00:00:00 2001
From: JingPiao Chen
Date: Sun, 4 Dec 2016 19:56:19 +0800
Subject: [PATCH] tests: fix maximum fd in pipe_maxfd
* tests/pipe_maxfd.c: Change INT_MAX to 0x7fff.
---
tests/pipe_maxfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/pipe_ma
d the way deep learning strace. Can you give me
some
advice? Thanks.
--
JingPiao Chen--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of
Version:4.14-ab28d7f1e5ab9b51f5708741bd13f92e768123d4
1.file_ioctl.c:130
125 int
126 file_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
127 {
128 switch (code) {
129 case FICLONE: /* W */
130 tprintf(", %d", (int) arg);
131 break
>From c40ccc35dc8e40fc6dc331af3d1884a54bc72784 Mon Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Fri, 16 Dec 2016 00:02:55 +0800
Subject: [PATCH] tests: check decoding of LOOP_* ioctls
* tests/ioctl_loop.c: New file.
* tests/ioctl_loop-v.c: Likewise.
* tests/ioctl_loop.test: New test.
* te
c354f9bc0) = -1 EBADF (Bad file
descriptor)
>From 5b2d4f12d61e5a03212de948508e830c9aeeef87 Mon Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Mon, 19 Dec 2016 23:08:09 +0800
Subject: [PATCH 1/2] sock: fix bitwise OR operation short circuit
* sock.c (decode_ifconf): Exchange the place of syserror()
>From 8b0c44c17d17ea3a9710ae7586579c288289a46e Mon Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Mon, 19 Dec 2016 23:29:54 +0800
Subject: [PATCH 2/2] tests: check decoding of SIOC* ioctls
* tests/ioctl_sock.c: New file.
* tests/ioctl_sock.test: New test.
* tests/.gitignore: Add ioctl_s
on Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Fri, 16 Dec 2016 00:02:55 +0800
Subject: [PATCH] tests: check decoding of LOOP_* ioctls
* tests/ioctl_loop.c: New file.
* tests/ioctl_loop-v.c: Likewise.
* tests/ioctl_loop.test: New test.
* tests/ioctl_loop-v.test: Likewise.
* tests/.gitign
>No, the formatting is broken all the same.
Sorry, my mistake.
>From e6bfa146fdd5c5eef9d317dffec93023889bd697 Mon Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Fri, 23 Dec 2016 08:10:43 +0800
Subject: [PATCH] tests: check decoding of LOOP_* ioctls
* tests/ioctl_loop.c: New file.
*
* tests/Makefile.am (check_PROGRAMS): Likewise.
>> (DECODER_TESTS): Add xattr-string.test.
>>
>> Signed-off-by: Gabriel Laskar
>Applied, thanks!
>--
>ldv
Could I ask a question? All the string even in struct should comply with -s
option?
All the string should NUL te
>Could you resend this using a different method that doesn't lead
>to damaged patches, please?
>From 8f2e5c5081f3d3bd10df8c9a2326d6a1b48deb3f Mon Sep 17 00:00:00 2001
From: JingPiao Chen
Date: Fri, 23 Dec 2016 08:23:52 +0800
Subject: [PATCH] tests: check decoding of SIOC* i
>This cannot be the right fix:
>if umove returned an error, ifc.ifc_buf is undefined.
Yes, I make the same mistake. How to fix this bug? Thanks.
--
JingPiao Chen
2016-12-23 7:03 GMT+08:00 Dmitry V. Levin :
> On Mon, Dec 19, 2016 at 11:33:46PM +0800, JingPiao Chen wrote:
> &
* tests/.gitignore: Add add_key, attach-f-p-cmd and scno.h.
---
tests/.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/.gitignore b/tests/.gitignore
index 3b04590..bab02a0 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,17 +5,20 @@
*.tmp-*
*.tmp.*
*.trs
+scno.h
\
ioctl_uffdio.test \
ioctl_v4l2.test \
ioperm.test \
diff --git a/tests/ioctl_sock.c b/tests/ioctl_sock.c
new file mode 100644
index 000..82a8385
--- /dev/null
+++ b/tests/ioctl_sock.c
@@ -0,0 +1,290 @@
+/*
+ * This file is part of ioctl_sock strace test.
+ *
+ * Copyright (c) 2016 JingPiao
* sock.c (decode_ifconf): Always print ifc_len, don't judge ifc_buf.
---
sock.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/sock.c b/sock.c
index 3e197ed..1c87927 100644
--- a/sock.c
+++ b/sock.c
@@ -140,24 +140,19 @@ decode_ifconf(struct tcb *tcp, const lo
ew file mode 100644
index 000..323468a
--- /dev/null
+++ b/tests/ioctl_loop.c
@@ -0,0 +1,184 @@
+/*
+ * This file is part of ioctl_loop strace test.
+ *
+ * Copyright (c) 2016 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modif
;> (DECODER_TESTS): Add ioctl_loop.test and ioctl_loop-v.test.
>Hello.
>
>Thank you for your contribution, the patch has been applied to the
>master branch,
https://github.com/strace/strace/commit/3127a6a2754ee3c5cef94c91b9583a39cb3fe7
Like strace.1 -k option should add in output format group.
* strace.c (usage): Move -k option to output format group.
---
strace.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/strace.c b/strace.c
index 9df942e..13f4863 100644
--- a/strace.c
+++ b/strace.c
@@ -21
SIG_0 is not valid signal name, do not have signal number is 0.
Maybe not have greatly effect, but print error message is friendly.
* qualify.c (sigstr_to_uint): Compare signal number to zero.
Change index start from one.
---
qualify.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
In general, the random bytes is not number or letter, print
as hex array is clear, use 0x%02x format print it, easy to
konw each element is one byte, so 0 will print 0x00.
* getrandom.c:
* tests/getrandom.c: Update print buffer.
* tests/getrandom.test: Update.
---
getrandom.c | 16 ++
\
vmsplice.test \
wait4.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..df58879
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary
.test \
+ ustat.test \
vhangup.test \
vmsplice.test \
wait4.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..df58879
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights res
e.test \
wait4.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..ffc69b4
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or w
\
utimensat.test \
utimes.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..3e82f12
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms
\
utimensat.test \
utimes.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..435b1fd
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms
\
utimensat.test \
utimes.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..c93862c
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms
* tests/mlock.c: Fix SKIP_MAIN_UNDEFINED spell error.
---
tests/mlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/mlock.c b/tests/mlock.c
index be962e2..8e9806b 100644
--- a/tests/mlock.c
+++ b/tests/mlock.c
@@ -24,6 +24,6 @@ main(void)
#else
-SKIP_MAIN_DEFINED
\
userfaultfd.test \
+ ustat.test \
utime.test \
utimensat.test \
utimes.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..0b17aee
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights
is unsigned int on alpha and s390, and kernel_ulong_t on other
>architectures;
>also, struct ustat also contains f_fname[] and f_fpack[].
>
>In other words, you really need to decode ustat.
Can you give me a hand? Is it if
\
userfaultfd.test \
+ ustat.test \
utime.test \
utimensat.test \
utimes.test \
diff --git a/tests/ustat.c b/tests/ustat.c
new file mode 100644
index 000..99f1f9d
--- /dev/null
+++ b/tests/ustat.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights
---
strace.1 | 6 --
1 file changed, 6 deletions(-)
diff --git a/strace.1 b/strace.1
index 0356c2d..351dc14 100644
--- a/strace.1
+++ b/strace.1
@@ -205,7 +205,6 @@ Here the second argument represents the full set of all
signals.
.SH OPTIONS
.SS Output format
.TP 12
-.TP
.BI "\-a " colum
---
When I decode ustat syscall
# include DEF_MPERS_TYPE(ustat_t) will fault
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index afc3dd2..a7d7006 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -880,7 +880,7 @@ mpers-m%.stamp: $(srcdir_mpe
/tests/ustat.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must
echo '#undef MPERS_PRINTER_NAME' >> $@-t
>> echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >>
$@-t
--
JingPiao Chen
--
Check out the vibrant tech community on one of
> .SS Miscellaneous
>> .TP 12
>> -.TP
>> .B \-d
>> Show some debugging output of
>> .B strace
>
>This patch removes redundant .TP macros, but does it really change
>alignment?
I means right alignment, I found that start from OPTIONS the description
not over
If have whitespace between pound and include, or more than one
whitespace between include and DEF_MPERS_TYPE, the regular
expression will not match.
* Makefile.am (m%_type_defs.h): Fix regular expression.
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile
Hello strace-developers:
My name is JingPiao Chen. I'am a Computer Science sophomore from
Guangdong Pharmaceutical University. I am interested in Netlink socket
parsers suggested by Gabriel Laskar and Dmitry V. Levin. I am familiar
with C, git, shell script, and gdb.
My current work base o
>Hello strace-developers:
> My name is JingPiao Chen. I'am a Computer Science sophomore from
>Guangdong Pharmaceutical University. I am interested in Netlink socket
>parsers suggested by Gabriel Laskar and Dmitry V. Levin. I am familiar
>with C, git, shell script, and gdb.
>
>Hi,
2017-03-27 6:16 GMT+08:00 Dmitry V. Levin wrote:
>On Sun, Mar 19, 2017 at 12:25:11PM +0800, JingPiao Chen wrote:
>> Hello strace-developers:
>> My name is JingPiao Chen. I'am a Computer Science sophomore from
>> Guangdong Pharmaceutical University. I am
On Tue, Mar 28, 2017 at 10:37 AM, Dmitry V. Levin wrote:
>On Mon, Mar 27, 2017 at 10:40:05PM +0800, JingPiao Chen wrote:
>> 2017-03-27 6:16 GMT+08:00 Dmitry V. Levin wrote:
>> >On Sun, Mar 19, 2017 at 12:25:11PM +0800, JingPiao Chen wrote:
>> >> Hello strace-develop
vin wrote:
>>On Mon, Mar 27, 2017 at 10:40:05PM +0800, JingPiao Chen wrote:
>>> 2017-03-27 6:16 GMT+08:00 Dmitry V. Levin wrote:
>>> >On Sun, Mar 19, 2017 at 12:25:11PM +0800, JingPiao Chen wrote:
>>> >> Hello strace-developers:
>>> >> My n
Color output system call name, return value, error message,
fd, address and prefix pid.
* color.h: New file.
* Makefile.am (strace_SOURCES): Add color.h.
* defs.h (color_attr): New enum.
(color_tprintf, color_tprints): New prototype.
* syscall.c (trace_syscall_entering): Color output system call n
* tests/color_output.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add color_output.test.
---
tests/Makefile.am | 1 +
tests/color_output.test | 17 +
2 files changed, 18 insertions(+)
create mode 100755 tests/color_output.test
diff --git a/tests/Makefile.am b/tests
* strace.c (vtprintf): New function.
(tprintf): Use it.
---
strace.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/strace.c b/strace.c
index 7214e6e..2b50cc0 100644
--- a/strace.c
+++ b/strace.c
@@ -569,12 +569,9 @@ strace_popen(const char *command)
Recently, class %sched and %clock are added. Is it necessary to add
regular expression to filter system call?
I use '@' as the prefix of regular expression. I think following regular
expressions may be used. @time, @[pg]id, @^wait @xattr, @^dup, @^send,
@^recv, @^read, @^write, @^sem, @^shm, @^msg
* qualify.c (qualify_syscall_regex): New function.
(qualify_syscall_name): Use qualify_syscall_regex function.
* tests/regex.test: Check this.
* tests/Makefile.am (DECODER_TESTS): Add regex.test.
---
qualify.c | 36 +++
tests/Makefile.am | 1 +
tests/regex.test |
On Mon, Apr 10, 2017 at 3:57 AM, Dmitry V. Levin wrote:
>On Sat, Apr 08, 2017 at 10:16:52PM +0800, JingPiao Chen wrote:
>> Recently, class %sched and %clock are added. Is it necessary to add
>> regular expression to filter system call?
>
>Indeed. Do we really need %sched a
>the start) to match sed, awk, perl (I think dtrace also has similar
>predicate syntax as well?) etc.
Yes, '/' is better, I updated the patch.
--
JingPiao Chen
--
Check out the vibrant tech community on one of the
* qualify.c (qualify_syscall_regex): New function.
(qualify_syscall_name): Use qualify_syscall_regex function.
* strace.1: Document it.
* NEWS: Mention this.
* tests/regex.test: Check this.
* tests/Makefile.am (DECODER_TESTS): Add regex.test.
* tests/options-syntax.test:
Add check for invaild regex
On Thu, Apr 13, 2017 at 5:10 AM, Dmitry V. Levin wrote:
>On Wed, Apr 12, 2017 at 09:31:51PM +0800, JingPiao Chen wrote:
>> @@ -198,6 +199,48 @@ qualify_syscall_number(const char *s, struct
number_set *set)
>> return done;
>> }
>>
>> +static bool
>> +qual
* qualify.c: Include .
(qualify_syscall_regex): New function.
(qualify_syscall): Use it.
* strace.1: Document -e trace=/regex option.
* NEWS: Mention -e trace=/regex option.
* tests/regex.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add it.
* tests/options-syntax.test:
Add check for invaild
* defs.h (readpath_select, readpath_match): New prototypes.
(writepath_select, writepath_match): Likewise.
* pathtrace.c (readpath_select, readpath_match): New functions.
(writepath_select, writepath_match): Likewise.
(path_select): Add syntax check.
* qualify.c (qualify_read): Use readpath_select.
* defs.h (paths_selected): Remove the declaration.
(tracing_paths): Replace the macro with a global variable.
* strace.c (tracing_paths): New global variable.
(init): Adjust -P option handler.
* pathtrace.c (pathmatch): Add a parameter of type struct path_set.
(upathmatch, fdmatch, storepath): Like
On Mon, Apr 17, 2017 at 9:40 PM, Dmitry V. Levin wrote:
>On Wed, Mar 29, 2017 at 05:39:59PM +0800, JingPiao Chen wrote:
>> I updated the patch[1] and the proposal draft[2].
>> Please provide some feedback.
>> [1]https://github.com/ppiao/strace/tree/nl-socket
>
>As I sai
i/Guide%20for%20new%20contributors/
[2]https://sourceforge.net/p/strace/wiki/FeatureRequests/
--
JingPiao Chen
--
Check out the vibrant tech community on one of the world's most
engaging te
Hi, strace community:
My name is JingPiao Chen. I'm luckily selected by strace to work on
Netlink socket parsers in GSoC this year. My main goal is to extend to
support
more netlink family protocols.
I want to start my work now. When I modify the code by Fabien Siron,
I have
Introduce getfdnlproto to obtain netlink protocol from fd
919e52c7 Introduce get_sockaddr_by_inode_cached and get_sockaddr_by_inode
26fb0cba Introduce cache_inode_details
d61022f5 netlink: decode NLMSG_DONE message
[1]https://github.com/ppiao/strace
--
JingPiao Chen
On Fri, Jun 02, 2017 at 06:25:28PM +0300, Dmitry V. Levin wrote:
> On Fri, May 05, 2017 at 06:21:17PM +0800, JingPiao Chen wrote:
> > * netlink.c (decode_payload): Decode NLMSG_DONE message.
> > * tests/netlink_protocol.c: Add check for decoding
> > of NLMSG_DONE message.
&
On 4 June 2017 at 17:56, Dmitry V. Levin wrote:
> On Sun, Jun 04, 2017 at 03:57:08PM +0800, JingPiao Chen wrote:
> > On Fri, Jun 02, 2017 at 06:25:28PM +0300, Dmitry V. Levin wrote:
> > > On Fri, May 05, 2017 at 06:21:17PM +0800, JingPiao Chen wrote:
[...]
> > > I sug
\
oldselect.test \
diff --git a/tests/netlink_route.c b/tests/netlink_route.c
new file mode 100644
index 000..7946121
--- /dev/null
+++ b/tests/netlink_route.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and
\
netlink_sock_diag.test \
nsyscalls.test \
oldselect.test \
diff --git a/tests/netlink_selinux.c b/tests/netlink_selinux.c
new file mode 100644
index 000..ef30bad
--- /dev/null
+++ b/tests/netlink_selinux.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved
\
netlink_sock_diag.test \
nsyscalls.test \
diff --git a/tests/netlink_netfilter.c b/tests/netlink_netfilter.c
new file mode 100644
index 000..811585a
--- /dev/null
+++ b/tests/netlink_netfilter.c
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved
\
nsyscalls.test \
diff --git a/tests/netlink_audit.c b/tests/netlink_audit.c
new file mode 100644
index 000..e955c42
--- /dev/null
+++ b/tests/netlink_audit.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and
perror_msg_and_skip("bind");
+
+ return fd;
+}
diff --git a/tests/netlink_sock_diag.c b/tests/netlink_sock_diag.c
new file mode 100644
index 000..09eb2bf
--- /dev/null
+++ b/tests/netlink_sock_diag.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights re
\
personality.test \
diff --git a/tests/netlink_xfrm.c b/tests/netlink_xfrm.c
new file mode 100644
index 000..fa50080
--- /dev/null
+++ b/tests/netlink_xfrm.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with
On Sun, Jun 04, 2017 at 10:40:09PM +0300, Dmitry V. Levin wrote:
> On Mon, Jul 11, 2016 at 12:54:59PM +, Fabien Siron wrote:
> > Decode and print the type of the main netlink protocols.
>
> JingPiao Chen, I've reworked Fabien's commits from your netlink branch
>
perror_msg_and_skip("bind");
+
+ return fd;
+}
diff --git a/tests/netlink_sock_diag.c b/tests/netlink_sock_diag.c
new file mode 100644
index 000..09eb2bf
--- /dev/null
+++ b/tests/netlink_sock_diag.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights re
old_mmap -a11 -e trace=mmap
diff --git a/tests/netlink_netfilter.c b/tests/netlink_netfilter.c
new file mode 100644
index 000..811585a
--- /dev/null
+++ b/tests/netlink_netfilter.c
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and
--git a/tests/netlink_xfrm.c b/tests/netlink_xfrm.c
new file mode 100644
index 000..fa50080
--- /dev/null
+++ b/tests/netlink_xfrm.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
/tests/netlink_route.c b/tests/netlink_route.c
new file mode 100644
index 000..7946121
--- /dev/null
+++ b/tests/netlink_route.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
-a18 -v -P stat.sample
diff --git a/tests/netlink_selinux.c b/tests/netlink_selinux.c
new file mode 100644
index 000..ef30bad
--- /dev/null
+++ b/tests/netlink_selinux.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source
/netlink_audit.c b/tests/netlink_audit.c
new file mode 100644
index 000..e955c42
--- /dev/null
+++ b/tests/netlink_audit.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification
Done, thank you.
--
JingPiao Chen
On 6 June 2017 at 00:53, Dmitry V. Levin wrote:
> On Mon, Jun 05, 2017 at 03:07:04PM +0800, JingPiao Chen wrote:
> > On Sun, Jun 04, 2017 at 10:40:09PM +0300, Dmitry V. Levin wrote:
> [...]
> > > getfdnlproto (get_fd_nl_family in my
I decoded selinux and audit. These two days are busy fixing last week's
code.
I have rebased my code to latest main tree, I will continue to fix last
week's code and decode audit next week.
--
Check out the vibrant tech com
* netlink.c: Include xlat/netlink_get_flags.h,
xlat/netlink_new_flags.h, xlat/nl_route_get_types.h,
xlat/nl_route_new_types.h, xlat/nl_xfrm_get_types.h,
and xlat/nl_xfrm_new_types.h.
(decode_nlmsg_flags): New function.
(print_nlmsghdr): Use it.
* xlat/netlink_get_flags.in: New file.
* xlat/netlink_
* tests/netlink_route.c: Add check for
NETLINK_ROUTE get and new flags.
* tests/netlink_sock_diag.c: Add check for
NETLINK_SOCK_DIAG get flags.
* tests/netlink_xfrm.c: Add check for
NETLINK_XFRM get and new flags.
---
tests/netlink_route.c | 26 ++
tests/netlink_sock_di
* tests/netlink_route.c: Add check for
NETLINK_ROUTE get and new flags.
* tests/netlink_sock_diag.c: Add check for
NETLINK_SOCK_DIAG get flags.
* tests/netlink_xfrm.c: Add check for
NETLINK_XFRM get and new flags.
---
tests/netlink_route.c | 43 +++
test
* netlink.c (decode_nlmsg_flags): New function.
(print_nlmsghdr): Use it.
* xlat/netlink_get_flags.in: New file.
* xlat/netlink_new_flags.in: Likewise.
Co-authored-by: Fabien Siron
Co-authored-by: Dmitry V. Levin
---
RTM_DELACTION seem use get flags (NLM_F_ROOT)
net/sched/act_api.c:
static int t
* netlink.c: Include "xlat/netlink_get_flags.h",
"xlat/netlink_new_flags.h".
(decode_nlmsg_flags): New function.
(print_nlmsghdr): Use it.
* xlat/netlink_get_flags.in: New file.
* xlat/netlink_new_flags.in: Likewise.
Co-authored-by: Fabien Siron
Co-authored-by: Dmitry V. Levin
---
Update commit
st struct {
> static void
> decode_nlmsg_type(const uint16_t type, const unsigned int family)
> {
> + if (!nlmsg_types [NETLINK_GENERIC].xlat)
> + nlmsg_types [NETLINK_GENERIC].xlat = genl_families_xlat
YAMATO
Missing tests/.gitignore.
--
JingPiao Chen
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
* dup3.c (SKIP_MAIN_UNDEFINED): Remove duplicated &&.
---
tests/dup3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/dup3.c b/tests/dup3.c
index 252e846..7a65b61 100644
--- a/tests/dup3.c
+++ b/tests/dup3.c
@@ -23,6 +23,6 @@ main(void)
#else
-SKIP_MAIN_UNDEFINED("_
* tests/dup3.c (SKIP_MAIN_UNDEFINED): Remove repeated &&.
---
Update commit message
tests/dup3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/dup3.c b/tests/dup3.c
index 252e846..7a65b61 100644
--- a/tests/dup3.c
+++ b/tests/dup3.c
@@ -23,6 +23,6 @@ main(void)
#els
e than a switch statement where every case is a function
call.
>
> I've pushed 3 commits to ldv/netlink that demonstrate my idea of netlink
> family specific payload decoders, please have a look.
Ok, I will update my code as soon as possible and send to ma
%d, {{len=%u, type=SOCK_DIAG_BY_FAMILY"
+ ", flags=NLM_F_DUMP, seq=0, pid=0}, {family=AF_UNIX, %p}}"
+ ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
+ fd, NLMSG_HDRLEN + (unsigned int) sizeof(*msg),
+ NLMSG_DATA(nlh) + 1,
+ NLMSG_HDRLEN + (unsigned int) sizeo
* linux/smc_diag.h: New file.
* Makefile.am (EXTRA_DIST): Add linux/smc_diag.h.
* netlink_sock_diag.c: Include ,
"xlat/smc_diag_extended_flags.h" and "xlat/smc_states.h".
(decode_smc_diag_req, decode_smc_diag_msg): New functions.
(diag_decoders): Add AF_SMC.
* xlat/smc_diag_extended_flags.in: New f
* tests/netlink_sock_diag.c: Include
and .
(test_inet_diag_req, test_inet_diag_req_v2)
(test_inet_diag_msg): New functions.
(mian): Use them.
Co-authored-by: Fabien Siron
---
tests/netlink_sock_diag.c | 397 ++
1 file changed, 397 insertions(+)
diff
* tests/netlink_sock_diag.c: Include .
(test_netlink_diag_req, test_netlink_diag_msg): New functions.
(main): Use them.
Co-authored-by: Fabien Siron
---
tests/netlink_sock_diag.c | 242 ++
1 file changed, 242 insertions(+)
diff --git a/tests/netlink_s
* defs.h (inet_protocols): New xlat prototype.
* linux/inet_diag.h (inet_diag_req): New structure.
(INET_DIAG_*): New enum.
* netlink_sock_diag.c: Include ,
and "xlat/inet_diag_extended_flags.h".
(print_inet_diag_sockid, decode_inet_diag_req_compat)
(decode_inet_diag_req_v2, decode_inet_diag_req)
* tests/netlink_sock_diag.c: Include
and .
(test_packet_diag_req, test_packet_diag_msg): New functions.
(main): Use them.
Co-authored-by: Fabien Siron
---
tests/netlink_sock_diag.c | 240 ++
1 file changed, 240 insertions(+)
diff --git a/tests/netlin
* tests/netlink_sock_diag.c: Include
and .
(test_smc_diag_req, test_smc_diag_msg): New functions.
(main): Use them.
---
tests/netlink_sock_diag.c | 266 ++
1 file changed, 266 insertions(+)
diff --git a/tests/netlink_sock_diag.c b/tests/netlink_sock_di
* linux/netlink_diag.h (NDIAG_SHOW_GROUPS)
(NDIAG_SHOW_RING_CFG): New macros.
* netlink_sock_diag.c: Include ,
"xlat/netlink_diag_show.h" and "xlat/netlink_states.h".
(decode_netlink_diag_req, decode_netlink_diag_msg): New functions.
(diag_decoders): Add AF_NETLINK.
* xlat/netlink_diag_show.in: New
* linux/packet_diag.h: New file.
* Makefile.am (EXTRA_DIST): Add linux/packet_diag.h.
* defs.h (ethernet_protocols): New xlat prototype.
* netlink_sock_diag.c: Include
and "xlat/packet_diag_show.h".
(decode_packet_diag_req, decode_packet_diag_msg): New functions.
(diag_decoders): Add AF_PACKET.
*
On Tue, Jun 13, 2017 at 07:10:13PM +0300, Dmitry V. Levin wrote:
> On Tue, Jun 13, 2017 at 07:04:21PM +0800, JingPiao Chen wrote:
> > +static void
> > +test_unix_diag_req(const int fd)
> > +{
> > ...
> > + /* short read of unix_diag_req */
> > + nlh = nlh0
On Wed, Jun 14, 2017 at 05:06:06AM +0300, Dmitry V. Levin wrote:
> On Wed, Jun 14, 2017 at 03:19:46AM +0300, Dmitry V. Levin wrote:
> > On Wed, Jun 14, 2017 at 07:49:34AM +0800, JingPiao Chen wrote:
> > > On Tue, Jun 13, 2017 at 07:10:13PM +0300, Dmitry V. Levin wrote:
> >
* tests/printstr.c: Add a case for room < DEFAULT_STRLEN + 1.
---
tests/printstr.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/printstr.c b/tests/printstr.c
index 330234f..035ce9c 100644
--- a/tests/printstr.c
+++ b/tests/printstr.c
@@ -40,7 +40,7 @@ int
main(v
2017-06-14 12:35 GMT+08:00 Dmitry V. Levin :
> On Wed, Jun 14, 2017 at 11:53:02AM +0800, JingPiao Chen wrote:
> > On Wed, Jun 14, 2017 at 05:06:06AM +0300, Dmitry V. Levin wrote:
> > > On Wed, Jun 14, 2017 at 03:19:46AM +0300, Dmitry V. Levin wrote:
> > > > On Wed, Ju
On Tue, Jun 13, 2017 at 11:47:45PM +0300, Dmitry V. Levin wrote:
> On Tue, Jun 13, 2017 at 10:13:24PM +0800, JingPiao Chen wrote:
[...]
> > +#ifdef AF_SMC
> > +static bool
> > +decode_smc_diag_req(struct tcb *const tcp,
> > +const struct nlmsghdr *const nlmsghdr,
&g
1 - 100 of 549 matches
Mail list logo