You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(3) |
Feb
(1) |
Mar
(62) |
Apr
(29) |
May
(4) |
Jun
|
Jul
(11) |
Aug
(30) |
Sep
(8) |
Oct
(31) |
Nov
(2) |
Dec
(13) |
| 2002 |
Jan
(4) |
Feb
(3) |
Mar
(12) |
Apr
(2) |
May
(7) |
Jun
(2) |
Jul
(7) |
Aug
(5) |
Sep
(4) |
Oct
(8) |
Nov
(5) |
Dec
(17) |
| 2003 |
Jan
(24) |
Feb
(19) |
Mar
(19) |
Apr
(22) |
May
(18) |
Jun
(16) |
Jul
(21) |
Aug
(48) |
Sep
(31) |
Oct
(45) |
Nov
(52) |
Dec
(54) |
| 2004 |
Jan
(71) |
Feb
(60) |
Mar
(54) |
Apr
(50) |
May
(88) |
Jun
(76) |
Jul
(62) |
Aug
(35) |
Sep
(20) |
Oct
(37) |
Nov
(66) |
Dec
(45) |
| 2005 |
Jan
(12) |
Feb
(5) |
Mar
(11) |
Apr
(6) |
May
(6) |
Jun
(6) |
Jul
(29) |
Aug
(61) |
Sep
(17) |
Oct
(45) |
Nov
(34) |
Dec
(17) |
| 2006 |
Jan
(13) |
Feb
(10) |
Mar
(15) |
Apr
(7) |
May
(13) |
Jun
(24) |
Jul
(12) |
Aug
(9) |
Sep
(17) |
Oct
(61) |
Nov
(58) |
Dec
(77) |
| 2007 |
Jan
(67) |
Feb
(61) |
Mar
(54) |
Apr
(93) |
May
(104) |
Jun
(131) |
Jul
(187) |
Aug
(116) |
Sep
(66) |
Oct
(41) |
Nov
(56) |
Dec
(19) |
| 2008 |
Jan
(19) |
Feb
(65) |
Mar
(127) |
Apr
(170) |
May
(137) |
Jun
(160) |
Jul
(168) |
Aug
(139) |
Sep
(104) |
Oct
(51) |
Nov
(69) |
Dec
(126) |
| 2009 |
Jan
(55) |
Feb
(148) |
Mar
(87) |
Apr
(74) |
May
(151) |
Jun
(121) |
Jul
(111) |
Aug
(97) |
Sep
(107) |
Oct
(177) |
Nov
(101) |
Dec
(84) |
| 2010 |
Jan
(55) |
Feb
(45) |
Mar
(114) |
Apr
(140) |
May
(152) |
Jun
(132) |
Jul
(115) |
Aug
(118) |
Sep
(105) |
Oct
(32) |
Nov
(26) |
Dec
(44) |
| 2011 |
Jan
(36) |
Feb
(138) |
Mar
(80) |
Apr
(34) |
May
(52) |
Jun
(72) |
Jul
(27) |
Aug
(119) |
Sep
(77) |
Oct
(71) |
Nov
(58) |
Dec
(50) |
| 2012 |
Jan
(59) |
Feb
(55) |
Mar
(82) |
Apr
(81) |
May
(31) |
Jun
(8) |
Jul
(13) |
Aug
(8) |
Sep
(10) |
Oct
(44) |
Nov
(13) |
Dec
(15) |
| 2013 |
Jan
(28) |
Feb
(72) |
Mar
(35) |
Apr
(14) |
May
(162) |
Jun
(55) |
Jul
(39) |
Aug
(20) |
Sep
(25) |
Oct
(15) |
Nov
(84) |
Dec
(14) |
| 2014 |
Jan
(31) |
Feb
(102) |
Mar
(112) |
Apr
(106) |
May
(105) |
Jun
(87) |
Jul
(36) |
Aug
(112) |
Sep
(31) |
Oct
(23) |
Nov
(68) |
Dec
(42) |
| 2015 |
Jan
(46) |
Feb
(131) |
Mar
(267) |
Apr
(48) |
May
(27) |
Jun
(42) |
Jul
(41) |
Aug
(41) |
Sep
(28) |
Oct
(22) |
Nov
(27) |
Dec
(45) |
| 2016 |
Jan
(55) |
Feb
(55) |
Mar
(363) |
Apr
(125) |
May
(173) |
Jun
(159) |
Jul
(69) |
Aug
(111) |
Sep
(130) |
Oct
(115) |
Nov
(26) |
Dec
(70) |
| 2017 |
Jan
(78) |
Feb
(43) |
Mar
(249) |
Apr
(130) |
May
(35) |
Jun
(436) |
Jul
(293) |
Aug
(423) |
Sep
(81) |
Oct
(16) |
Nov
(35) |
Dec
(110) |
| 2018 |
Jan
(67) |
Feb
(36) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Harsha S. <har...@gm...> - 2018-01-03 13:07:31
|
On Wed, Jan 3, 2018 at 6:33 PM, Harsha Sharma
<har...@gm...> wrote:
> * netlink.c: decode family NETLINK_KOBJECT_UEVENT if prefix is libudev
> * linux/netlink_kobject_uevent.h: New struct (udev_monitor_netlink_header)
>
With this patch,
strace -e%network udevadm monitor -u > /dev/null
recvmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=282,
nl_groups=0x000002}, msg_namelen=128->12,
msg_iov=[{iov_base={prefix=libudev, magic=4274712062, header_size=40,
properties_off=40, properties_len=299, filter_subsystem_hash=45314243,
filter_devtype_hash=0, filter_tag_bloom_hi=262146,
filter_tag_bloom_lo=32784}, iov_len=8192}], msg_iovlen=1,
msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET,
cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=32712, uid=0, gid=0}}],
msg_controllen=32, msg_flags=0}, 0) = 339
> Signed-off-by: Harsha Sharma <har...@gm...>
> ---
> linux/netlink_kobject_uevent.h | 16 ++++++++++++++++
> netlink.c | 27 ++++++++++++++++++++++++++-
> 2 files changed, 42 insertions(+), 1 deletion(-)
> create mode 100644 linux/netlink_kobject_uevent.h
>
> diff --git a/linux/netlink_kobject_uevent.h b/linux/netlink_kobject_uevent.h
> new file mode 100644
> index 00000000..d83ccad5
> --- /dev/null
> +++ b/linux/netlink_kobject_uevent.h
> @@ -0,0 +1,16 @@
> +#ifndef STRACE_LINUX_NETLINK_KOBJECT_UEVENT_H
> +#define STRACE_LINUX_NETLINK_KOBJECT_UEVENT_H
> +
> +struct udev_monitor_netlink_header {
> + char prefix[8];
> + unsigned int magic;
> + unsigned int header_size;
> + unsigned int properties_off;
> + unsigned int properties_len;
> + unsigned int filter_subsystem_hash;
> + unsigned int filter_devtype_hash;
> + unsigned int filter_tag_bloom_hi;
> + unsigned int filter_tag_bloom_lo;
> +};
> +
> +#endif /* !STRACE_LINUX_NETLINK_KOBJECT_UEVENT_H */
> diff --git a/netlink.c b/netlink.c
> index 6b9a1f5c..e991ed86 100644
> --- a/netlink.c
> +++ b/netlink.c
> @@ -32,6 +32,7 @@
> #include "nlattr.h"
> #include <linux/audit.h>
> #include <linux/rtnetlink.h>
> +#include <linux/netlink_kobject_uevent.h>
> #include <linux/xfrm.h>
> #include "xlat/netlink_ack_flags.h"
> #include "xlat/netlink_delete_flags.h"
> @@ -183,6 +184,29 @@ decode_nlmsg_type_netfilter(const struct xlat *const xlat,
> tprintf("%#x", msg_type);
> }
>
> +static bool
> +decode_nlmsg_type_kobject_uevent(struct tcb *tcp, kernel_ulong_t addr,
> + kernel_ulong_t len,
> + const void *const opaque_data)
> +{
> + struct udev_monitor_netlink_header uh;
> + const char *prefix = "libudev";
> +
> + if (len < sizeof(uh))
> + return false;
> + if (!umove_or_printaddr(tcp, addr, &uh) &&
> + strcmp(uh.prefix, prefix) == 0) {
> + tprintf("{prefix=%s, magic=%u, header_size=%u, properties_off=%u, properties_len=%u, filter_subsystem_hash=%u, filter_devtype_hash=%u, filter_tag_bloom_hi=%u, filter_tag_bloom_lo=%u}", uh.prefix,
> + uh.magic, uh.header_size, uh.properties_off,
> + uh.properties_len, uh.filter_subsystem_hash,
> + uh.filter_devtype_hash, uh.filter_tag_bloom_hi,
> + uh.filter_tag_bloom_lo);
> + return true;
> + }
> + return false;
> +}
> +
> +
> typedef void (*nlmsg_types_decoder_t)(const struct xlat *,
> uint16_t type,
> const char *dflt);
> @@ -628,7 +652,8 @@ decode_netlink(struct tcb *const tcp,
> const int family = get_fd_nl_family(tcp, fd);
>
> if (family == NETLINK_KOBJECT_UEVENT) {
> - printstrn(tcp, addr, len);
> + if (!decode_nlmsg_type_kobject_uevent(tcp, addr, len, NULL))
> + printstrn(tcp, addr, len);
> return;
> }
>
> --
> 2.11.0
>
|
|
From: Harsha S. <har...@gm...> - 2018-01-03 13:04:18
|
* netlink.c: decode family NETLINK_KOBJECT_UEVENT if prefix is libudev
* linux/netlink_kobject_uevent.h: New struct (udev_monitor_netlink_header)
Signed-off-by: Harsha Sharma <har...@gm...>
---
linux/netlink_kobject_uevent.h | 16 ++++++++++++++++
netlink.c | 27 ++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 linux/netlink_kobject_uevent.h
diff --git a/linux/netlink_kobject_uevent.h b/linux/netlink_kobject_uevent.h
new file mode 100644
index 00000000..d83ccad5
--- /dev/null
+++ b/linux/netlink_kobject_uevent.h
@@ -0,0 +1,16 @@
+#ifndef STRACE_LINUX_NETLINK_KOBJECT_UEVENT_H
+#define STRACE_LINUX_NETLINK_KOBJECT_UEVENT_H
+
+struct udev_monitor_netlink_header {
+ char prefix[8];
+ unsigned int magic;
+ unsigned int header_size;
+ unsigned int properties_off;
+ unsigned int properties_len;
+ unsigned int filter_subsystem_hash;
+ unsigned int filter_devtype_hash;
+ unsigned int filter_tag_bloom_hi;
+ unsigned int filter_tag_bloom_lo;
+};
+
+#endif /* !STRACE_LINUX_NETLINK_KOBJECT_UEVENT_H */
diff --git a/netlink.c b/netlink.c
index 6b9a1f5c..e991ed86 100644
--- a/netlink.c
+++ b/netlink.c
@@ -32,6 +32,7 @@
#include "nlattr.h"
#include <linux/audit.h>
#include <linux/rtnetlink.h>
+#include <linux/netlink_kobject_uevent.h>
#include <linux/xfrm.h>
#include "xlat/netlink_ack_flags.h"
#include "xlat/netlink_delete_flags.h"
@@ -183,6 +184,29 @@ decode_nlmsg_type_netfilter(const struct xlat *const xlat,
tprintf("%#x", msg_type);
}
+static bool
+decode_nlmsg_type_kobject_uevent(struct tcb *tcp, kernel_ulong_t addr,
+ kernel_ulong_t len,
+ const void *const opaque_data)
+{
+ struct udev_monitor_netlink_header uh;
+ const char *prefix = "libudev";
+
+ if (len < sizeof(uh))
+ return false;
+ if (!umove_or_printaddr(tcp, addr, &uh) &&
+ strcmp(uh.prefix, prefix) == 0) {
+ tprintf("{prefix=%s, magic=%u, header_size=%u, properties_off=%u, properties_len=%u, filter_subsystem_hash=%u, filter_devtype_hash=%u, filter_tag_bloom_hi=%u, filter_tag_bloom_lo=%u}", uh.prefix,
+ uh.magic, uh.header_size, uh.properties_off,
+ uh.properties_len, uh.filter_subsystem_hash,
+ uh.filter_devtype_hash, uh.filter_tag_bloom_hi,
+ uh.filter_tag_bloom_lo);
+ return true;
+ }
+ return false;
+}
+
+
typedef void (*nlmsg_types_decoder_t)(const struct xlat *,
uint16_t type,
const char *dflt);
@@ -628,7 +652,8 @@ decode_netlink(struct tcb *const tcp,
const int family = get_fd_nl_family(tcp, fd);
if (family == NETLINK_KOBJECT_UEVENT) {
- printstrn(tcp, addr, len);
+ if (!decode_nlmsg_type_kobject_uevent(tcp, addr, len, NULL))
+ printstrn(tcp, addr, len);
return;
}
--
2.11.0
|
|
From: Kommuru j. s. r. <kom...@gm...> - 2018-01-03 10:51:48
|
Can I be provided help in my above doubt and the internal workings of strace On Thu, Dec 28, 2017 at 7:49 PM, Kommuru jai shankar reddy < kom...@gm...> wrote: > I have a doubt: > There are three files file_ioctl.c, fs_x_ioctl.c and ioctl.c in > the https://codecov.io/github/strace/strace with their code coverages. > Now I have to find the corresponding test files in the strace/tests/ and > modify them to increase the code coverage right ? > > please correct me if I am understanding wrong > > On Tue, Dec 26, 2017 at 8:36 PM, Eugene Syromyatnikov <ev...@gm...> > wrote: > >> On Tue, Dec 26, 2017 at 1:44 PM, Kommuru jai shankar reddy >> <kom...@gm...> wrote: >> > Yes, I am interested in the micro project of adding tests to the test >> > suite. Could you please provide suggestions on getting started to >> this ? >> >> Sure. I'd suggest starting with ioctl decoders that are not shown as >> covered in LCOV reports, these are rather low-hanging fruits. The next >> thing is rarely used features that have no tests or are poorly tested, >> like path tracing or stack printing. It would be also benefitical to >> add some tests that cover some not previously test-covered aspects of >> strace's behaviour, like daemonized tracer, but in order to do that >> properly, some understanding of the strace internal workings is >> needed, and it might be difficult at first. >> >> The tests themselves reside in tests directory. The make target of >> interest is "make check", and you might be interested in >> --enable-code-coverage configuration option. >> >> Note also that code that is not covered by tests is more likely to >> contain errors (especially if it is some obscure ioctl one rarely >> cares about), so do not hesitate to fix it in case discrepancies >> between kernel's and strace's interpretation of syscall arguments are >> observed. >> >> > On Mon, Dec 25, 2017 at 11:49 PM, Eugene Syromyatnikov < >> ev...@gm...> >> > wrote: >> >> >> >> On Mon, Dec 25, 2017 at 5:06 PM, Kommuru jai shankar reddy >> >> <kom...@gm...> wrote: >> >> > Hello, >> >> > I'm jaya shankar,. Computer science student of national >> institute >> >> > of >> >> > technology andhra pradesh, India >> >> > I have used strace for my mini project for tracing system calls of >> >> > malware >> >> > executables and it helped me a lot. >> >> > I want to contribute to the community and apply as student for GSOC >> >> > 2k18. >> >> > I'm having knowledge of kernel, C, git and basics of networking. >> >> > So, it would be great if any one suggest me some tasks for micro >> >> > projects >> >> > for gsoc, some bugs to fix for a beginner like me. >> >> >> >> Thank you for showing interest in strace. >> >> >> >> Please take a look at [1], [2], and [3] as starting points. As Chen >> >> JingPiao also noted recently [4], there is an ongoing effort to add >> >> netlink protocol decoding support to strace, which may be of interest, >> >> taking in account aforementioned background. >> >> >> >> If you have any specific questions, don't hesitate to ask. >> >> >> >> [1] >> >> https://sourceforge.net/p/strace/wiki/Guide%20for%20new%20co >> ntributors/ >> >> [2] https://sourceforge.net/p/strace/wiki/Microprojects/ >> >> [3] https://sourceforge.net/p/strace/wiki/FeatureRequests/ >> >> [4] https://sourceforge.net/p/strace/mailman/message/36168713/ >> >> >> >> -- >> >> Eugene Syromyatnikov >> >> mailto:ev...@gm... >> >> xmpp:esyr@jabber.{ru|org} >> >> >> >> >> >> ------------------------------------------------------------ >> ------------------ >> >> Check out the vibrant tech community on one of the world's most >> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> _______________________________________________ >> >> Strace-devel mailing list >> >> Str...@li... >> >> https://lists.sourceforge.net/lists/listinfo/strace-devel >> > >> > >> > >> > >> > -- >> > Thanks >> > >> > K.jaishankar reddy >> > >> > >> > ------------------------------------------------------------ >> ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Strace-devel mailing list >> > Str...@li... >> > https://lists.sourceforge.net/lists/listinfo/strace-devel >> > >> >> >> >> -- >> Eugene Syromyatnikov >> mailto:ev...@gm... >> xmpp:esyr@jabber.{ru|org} >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Strace-devel mailing list >> Str...@li... >> https://lists.sourceforge.net/lists/listinfo/strace-devel >> > > > > -- > Thanks > > K.jaishankar reddy > > -- Thanks K.jaishankar reddy |
|
From: Dmitry V. L. <ld...@al...> - 2017-12-29 16:41:41
|
On Mon, Dec 18, 2017 at 01:24:55PM +0900, Masatake YAMATO wrote: > This patch is for demangling c++ symbols appeared in stack trace > with using cplus_demangle function in GNU libiberty library. I was reluctant to add this feature without a test, so it had to wait until someone will come up with a test. I've merged this patch now, thanks! -- ldv |
|
From: Kommuru j. s. r. <kom...@gm...> - 2017-12-28 14:19:31
|
I have a doubt:
There are three files file_ioctl.c, fs_x_ioctl.c and ioctl.c in
the https://codecov.io/github/strace/strace with their code coverages. Now
I have to find the corresponding test files in the strace/tests/ and modify
them to increase the code coverage right ?
please correct me if I am understanding wrong
On Tue, Dec 26, 2017 at 8:36 PM, Eugene Syromyatnikov <ev...@gm...>
wrote:
> On Tue, Dec 26, 2017 at 1:44 PM, Kommuru jai shankar reddy
> <kom...@gm...> wrote:
> > Yes, I am interested in the micro project of adding tests to the test
> > suite. Could you please provide suggestions on getting started to this
> ?
>
> Sure. I'd suggest starting with ioctl decoders that are not shown as
> covered in LCOV reports, these are rather low-hanging fruits. The next
> thing is rarely used features that have no tests or are poorly tested,
> like path tracing or stack printing. It would be also benefitical to
> add some tests that cover some not previously test-covered aspects of
> strace's behaviour, like daemonized tracer, but in order to do that
> properly, some understanding of the strace internal workings is
> needed, and it might be difficult at first.
>
> The tests themselves reside in tests directory. The make target of
> interest is "make check", and you might be interested in
> --enable-code-coverage configuration option.
>
> Note also that code that is not covered by tests is more likely to
> contain errors (especially if it is some obscure ioctl one rarely
> cares about), so do not hesitate to fix it in case discrepancies
> between kernel's and strace's interpretation of syscall arguments are
> observed.
>
> > On Mon, Dec 25, 2017 at 11:49 PM, Eugene Syromyatnikov <ev...@gm...
> >
> > wrote:
> >>
> >> On Mon, Dec 25, 2017 at 5:06 PM, Kommuru jai shankar reddy
> >> <kom...@gm...> wrote:
> >> > Hello,
> >> > I'm jaya shankar,. Computer science student of national
> institute
> >> > of
> >> > technology andhra pradesh, India
> >> > I have used strace for my mini project for tracing system calls of
> >> > malware
> >> > executables and it helped me a lot.
> >> > I want to contribute to the community and apply as student for GSOC
> >> > 2k18.
> >> > I'm having knowledge of kernel, C, git and basics of networking.
> >> > So, it would be great if any one suggest me some tasks for micro
> >> > projects
> >> > for gsoc, some bugs to fix for a beginner like me.
> >>
> >> Thank you for showing interest in strace.
> >>
> >> Please take a look at [1], [2], and [3] as starting points. As Chen
> >> JingPiao also noted recently [4], there is an ongoing effort to add
> >> netlink protocol decoding support to strace, which may be of interest,
> >> taking in account aforementioned background.
> >>
> >> If you have any specific questions, don't hesitate to ask.
> >>
> >> [1]
> >> https://sourceforge.net/p/strace/wiki/Guide%20for%20new%20contributors/
> >> [2] https://sourceforge.net/p/strace/wiki/Microprojects/
> >> [3] https://sourceforge.net/p/strace/wiki/FeatureRequests/
> >> [4] https://sourceforge.net/p/strace/mailman/message/36168713/
> >>
> >> --
> >> Eugene Syromyatnikov
> >> mailto:ev...@gm...
> >> xmpp:esyr@jabber.{ru|org}
> >>
> >>
> >> ------------------------------------------------------------
> ------------------
> >> Check out the vibrant tech community on one of the world's most
> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> _______________________________________________
> >> Strace-devel mailing list
> >> Str...@li...
> >> https://lists.sourceforge.net/lists/listinfo/strace-devel
> >
> >
> >
> >
> > --
> > Thanks
> >
> > K.jaishankar reddy
> >
> >
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Strace-devel mailing list
> > Str...@li...
> > https://lists.sourceforge.net/lists/listinfo/strace-devel
> >
>
>
>
> --
> Eugene Syromyatnikov
> mailto:ev...@gm...
> xmpp:esyr@jabber.{ru|org}
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Strace-devel mailing list
> Str...@li...
> https://lists.sourceforge.net/lists/listinfo/strace-devel
>
--
Thanks
K.jaishankar reddy
|
|
From: Chen J. <che...@gm...> - 2017-12-27 09:57:19
|
On 12/26 10:53, Harsha Sharma wrote:
> On Tue, Dec 26, 2017 at 9:49 AM, Chen Jingpiao <che...@gm...>
wrote:
> > On 12/25 10:26, Harsha Sharma wrote:
> >> On Mon, Dec 25, 2017 at 6:51 PM, JingPiao Chen <che...@gm...>
wrote:
> >> > On 12/25 06:12, Harsha Sharma wrote:
> >> >> Hello everyone,
> >> >
> >> > Hi.
> >> >
> >> >> I'm Harsha Sharma, a sophomore student at Indian Institute of
> >> >> Technology, Roorkee, India.
> >> >> I have knowledge of C, git, shell programming, kernel programming,
gdb
> >> >> and parsers and currently working as outreachy intern in
Linux-kernel
> >> >> (project nftables - Network filtration tool).
> >> >> Strace is one of my favorite tools in linux and want to contribute
to
> >> >> the community.
> >> >> I have looked into the mail archives about getting started and
> >> >> submitted two small patches. I have tried to understand the test
> >> >> infrastructure and will like to add some tests or fix some of the
> >> >> existing tests.
> >> >> It'll be great if someone can suggest either some tests or any other
> >> >> small bug-fix that I can work upon.
> >> >> Thanks :)
> >> >
> >> > I think write netlink socket parser is suited for you. This is a
GSoC 2016
> >> > and 2017 project. The part of netfilter has not implemented yet.
> >> > I working on it, but recent I am busy. If you are interested in it,
please
> >> > tell me.
> >> >
> >> Yes, definitely. I'm interested.
> >> How should I start with the project ? (Any guidance will be
> >> appreciated, meanwhile I'll try to go through your code in strace.)
> >> Can you assign me a small task in the project ?
> >> Thanks for your time. :')
> >
> > 300d9f1f: Further decode some attributes.
> > 37dfe8c7: Implement a small protocol.
> >
> > You can read these commits to get some idea.
>
> I'm unable to find the header file for kobject_uevent_types (like
> rtnetlink.h and selinux_netlink.h in case of route and selinux ).
> I'm approaching in the way similar to netlink_route and
> netlink_selinux, is this correct ?
NETLINK_KOBJECT_UEVENT netlink messages without a netlink message header.
You can search source code to see how to handle this.
$ git grep "NETLINK_KOBJECT_UEVENT"
netlink.c: if (family == NETLINK_KOBJECT_UEVENT) {
If family == NETLINK_KOBJECT_UEVENT, we deocde NETLINK_KOBJECT_UEVENT
directly.
>
> > I recommend you to decode libudev
> > netlink header (struct udev_monitor_netlink_header).
> >
> > systemd/src/libudev/libudev-monitor.c: 76
> > struct udev_monitor_netlink_header {
> > /* "libudev" prefix to distinguish libudev and kernel messages
*/
> > char prefix[8];
> > /*
> > * magic to protect against daemon <-> library message format
mismatch
> > * used in the kernel from socket filter rules; needs to be
stored in network order
> > */
> > unsigned int magic;
> > /* total length of header structure known to the sender */
> > unsigned int header_size;
> > /* properties string buffer */
> > unsigned int properties_off;
> > unsigned int properties_len;
> > /*
> > * hashes of primary device properties strings, to let libudev
subscribers
> > * use in-kernel socket filters; values need to be stored in
network order
> > */
> > unsigned int filter_subsystem_hash;
> > unsigned int filter_devtype_hash;
> > unsigned int filter_tag_bloom_hi;
> > unsigned int filter_tag_bloom_lo;
> > };
>
> ./tests/netlink_kobject_uevent
> sendto(3,
"\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37",
> 32, MSG_DONTWAIT, NULL, 0) = -1 ECONNREFUSED (Connection refused)
> sendto(3,
"=\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36"...,
> 33, MSG_DONTWAIT, NULL, 0) = -1 ECONNREFUSED (Connection refused)
> +++ exited with 0 +++
>
> This string
"\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"
> needs to be parsed as prefix, magic, header_size, properties_off,
> properties_len, and more ( from struct udev_monitor_netlink_header).
> Is this correct, just want to make sure that I'm approaching in right
> direction ?
> Thanks for your time.
If the prefix is "libudev", it contain struct udev_monitor_netlink_header.
You can read current strace output to get some idea.
$ strace -e%network udevadm monitor > /dev/null # Remove your mouse
$ strace -e%network udevadm monitor -u > /dev/null # Remove your mouse
$ strace -e%network udevadm monitor -k > /dev/null # Remove your mouse
>
> Regards,
> Harsha Sharma
>
> > Netlink overview and its strace parsers:
> > http://blog.saruta.eu/netlink_strace.html
> >
> >>
> >> > More information:
> >> >
> >> > strace GSoC 2017 netlink socket parsers:
> >> >
https://ppiao.github.io/2017/08/22/strace-gsoc-2017-netlink-socket-parser.html
> >> >
> >> > My current work of netfilter parser:
> >> > (Need to fix.)
> >> > https://github.com/ppiao/strace
> >> >
> >
--
Chen Jingpiao
|
|
From: Harsha S. <har...@gm...> - 2017-12-26 17:24:03
|
On Tue, Dec 26, 2017 at 9:49 AM, Chen Jingpiao <che...@gm...> wrote:
> On 12/25 10:26, Harsha Sharma wrote:
>> On Mon, Dec 25, 2017 at 6:51 PM, JingPiao Chen <che...@gm...> wrote:
>> > On 12/25 06:12, Harsha Sharma wrote:
>> >> Hello everyone,
>> >
>> > Hi.
>> >
>> >> I'm Harsha Sharma, a sophomore student at Indian Institute of
>> >> Technology, Roorkee, India.
>> >> I have knowledge of C, git, shell programming, kernel programming, gdb
>> >> and parsers and currently working as outreachy intern in Linux-kernel
>> >> (project nftables - Network filtration tool).
>> >> Strace is one of my favorite tools in linux and want to contribute to
>> >> the community.
>> >> I have looked into the mail archives about getting started and
>> >> submitted two small patches. I have tried to understand the test
>> >> infrastructure and will like to add some tests or fix some of the
>> >> existing tests.
>> >> It'll be great if someone can suggest either some tests or any other
>> >> small bug-fix that I can work upon.
>> >> Thanks :)
>> >
>> > I think write netlink socket parser is suited for you. This is a GSoC 2016
>> > and 2017 project. The part of netfilter has not implemented yet.
>> > I working on it, but recent I am busy. If you are interested in it, please
>> > tell me.
>> >
>> Yes, definitely. I'm interested.
>> How should I start with the project ? (Any guidance will be
>> appreciated, meanwhile I'll try to go through your code in strace.)
>> Can you assign me a small task in the project ?
>> Thanks for your time. :')
>
> 300d9f1f: Further decode some attributes.
> 37dfe8c7: Implement a small protocol.
>
> You can read these commits to get some idea.
I'm unable to find the header file for kobject_uevent_types (like
rtnetlink.h and selinux_netlink.h in case of route and selinux ).
I'm approaching in the way similar to netlink_route and
netlink_selinux, is this correct ?
> I recommend you to decode libudev
> netlink header (struct udev_monitor_netlink_header).
>
> systemd/src/libudev/libudev-monitor.c: 76
> struct udev_monitor_netlink_header {
> /* "libudev" prefix to distinguish libudev and kernel messages */
> char prefix[8];
> /*
> * magic to protect against daemon <-> library message format mismatch
> * used in the kernel from socket filter rules; needs to be stored in network order
> */
> unsigned int magic;
> /* total length of header structure known to the sender */
> unsigned int header_size;
> /* properties string buffer */
> unsigned int properties_off;
> unsigned int properties_len;
> /*
> * hashes of primary device properties strings, to let libudev subscribers
> * use in-kernel socket filters; values need to be stored in network order
> */
> unsigned int filter_subsystem_hash;
> unsigned int filter_devtype_hash;
> unsigned int filter_tag_bloom_hi;
> unsigned int filter_tag_bloom_lo;
> };
./tests/netlink_kobject_uevent
sendto(3, "\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37",
32, MSG_DONTWAIT, NULL, 0) = -1 ECONNREFUSED (Connection refused)
sendto(3, "=\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36"...,
33, MSG_DONTWAIT, NULL, 0) = -1 ECONNREFUSED (Connection refused)
+++ exited with 0 +++
This string "\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"
needs to be parsed as prefix, magic, header_size, properties_off,
properties_len, and more ( from struct udev_monitor_netlink_header).
Is this correct, just want to make sure that I'm approaching in right
direction ?
Thanks for your time.
Regards,
Harsha Sharma
> Netlink overview and its strace parsers:
> http://blog.saruta.eu/netlink_strace.html
>
>>
>> > More information:
>> >
>> > strace GSoC 2017 netlink socket parsers:
>> > https://ppiao.github.io/2017/08/22/strace-gsoc-2017-netlink-socket-parser.html
>> >
>> > My current work of netfilter parser:
>> > (Need to fix.)
>> > https://github.com/ppiao/strace
>> >
>
> --
> Chen Jingpiao
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Strace-devel mailing list
> Str...@li...
> https://lists.sourceforge.net/lists/listinfo/strace-devel
|
|
From: Eugene S. <ev...@gm...> - 2017-12-26 15:07:21
|
On Tue, Dec 26, 2017 at 1:44 PM, Kommuru jai shankar reddy <kom...@gm...> wrote: > Yes, I am interested in the micro project of adding tests to the test > suite. Could you please provide suggestions on getting started to this ? Sure. I'd suggest starting with ioctl decoders that are not shown as covered in LCOV reports, these are rather low-hanging fruits. The next thing is rarely used features that have no tests or are poorly tested, like path tracing or stack printing. It would be also benefitical to add some tests that cover some not previously test-covered aspects of strace's behaviour, like daemonized tracer, but in order to do that properly, some understanding of the strace internal workings is needed, and it might be difficult at first. The tests themselves reside in tests directory. The make target of interest is "make check", and you might be interested in --enable-code-coverage configuration option. Note also that code that is not covered by tests is more likely to contain errors (especially if it is some obscure ioctl one rarely cares about), so do not hesitate to fix it in case discrepancies between kernel's and strace's interpretation of syscall arguments are observed. > On Mon, Dec 25, 2017 at 11:49 PM, Eugene Syromyatnikov <ev...@gm...> > wrote: >> >> On Mon, Dec 25, 2017 at 5:06 PM, Kommuru jai shankar reddy >> <kom...@gm...> wrote: >> > Hello, >> > I'm jaya shankar,. Computer science student of national institute >> > of >> > technology andhra pradesh, India >> > I have used strace for my mini project for tracing system calls of >> > malware >> > executables and it helped me a lot. >> > I want to contribute to the community and apply as student for GSOC >> > 2k18. >> > I'm having knowledge of kernel, C, git and basics of networking. >> > So, it would be great if any one suggest me some tasks for micro >> > projects >> > for gsoc, some bugs to fix for a beginner like me. >> >> Thank you for showing interest in strace. >> >> Please take a look at [1], [2], and [3] as starting points. As Chen >> JingPiao also noted recently [4], there is an ongoing effort to add >> netlink protocol decoding support to strace, which may be of interest, >> taking in account aforementioned background. >> >> If you have any specific questions, don't hesitate to ask. >> >> [1] >> https://sourceforge.net/p/strace/wiki/Guide%20for%20new%20contributors/ >> [2] https://sourceforge.net/p/strace/wiki/Microprojects/ >> [3] https://sourceforge.net/p/strace/wiki/FeatureRequests/ >> [4] https://sourceforge.net/p/strace/mailman/message/36168713/ >> >> -- >> Eugene Syromyatnikov >> mailto:ev...@gm... >> xmpp:esyr@jabber.{ru|org} >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Strace-devel mailing list >> Str...@li... >> https://lists.sourceforge.net/lists/listinfo/strace-devel > > > > > -- > Thanks > > K.jaishankar reddy > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Strace-devel mailing list > Str...@li... > https://lists.sourceforge.net/lists/listinfo/strace-devel > -- Eugene Syromyatnikov mailto:ev...@gm... xmpp:esyr@jabber.{ru|org} |
|
From: Kommuru j. s. r. <kom...@gm...> - 2017-12-26 13:44:55
|
Yes, I am interested in the micro project of adding tests to the test suite. Could you please provide suggestions on getting started to this ? On Mon, Dec 25, 2017 at 11:49 PM, Eugene Syromyatnikov <ev...@gm...> wrote: > On Mon, Dec 25, 2017 at 5:06 PM, Kommuru jai shankar reddy > <kom...@gm...> wrote: > > Hello, > > I'm jaya shankar,. Computer science student of national institute > of > > technology andhra pradesh, India > > I have used strace for my mini project for tracing system calls of > malware > > executables and it helped me a lot. > > I want to contribute to the community and apply as student for GSOC 2k18. > > I'm having knowledge of kernel, C, git and basics of networking. > > So, it would be great if any one suggest me some tasks for micro projects > > for gsoc, some bugs to fix for a beginner like me. > > Thank you for showing interest in strace. > > Please take a look at [1], [2], and [3] as starting points. As Chen > JingPiao also noted recently [4], there is an ongoing effort to add > netlink protocol decoding support to strace, which may be of interest, > taking in account aforementioned background. > > If you have any specific questions, don't hesitate to ask. > > [1] https://sourceforge.net/p/strace/wiki/Guide%20for%20new% > 20contributors/ > [2] https://sourceforge.net/p/strace/wiki/Microprojects/ > [3] https://sourceforge.net/p/strace/wiki/FeatureRequests/ > [4] https://sourceforge.net/p/strace/mailman/message/36168713/ > > -- > Eugene Syromyatnikov > mailto:ev...@gm... > xmpp:esyr@jabber.{ru|org} > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Strace-devel mailing list > Str...@li... > https://lists.sourceforge.net/lists/listinfo/strace-devel > -- Thanks K.jaishankar reddy |
|
From: Chen J. <che...@gm...> - 2017-12-26 04:19:18
|
On 12/25 10:26, Harsha Sharma wrote:
> On Mon, Dec 25, 2017 at 6:51 PM, JingPiao Chen <che...@gm...> wrote:
> > On 12/25 06:12, Harsha Sharma wrote:
> >> Hello everyone,
> >
> > Hi.
> >
> >> I'm Harsha Sharma, a sophomore student at Indian Institute of
> >> Technology, Roorkee, India.
> >> I have knowledge of C, git, shell programming, kernel programming, gdb
> >> and parsers and currently working as outreachy intern in Linux-kernel
> >> (project nftables - Network filtration tool).
> >> Strace is one of my favorite tools in linux and want to contribute to
> >> the community.
> >> I have looked into the mail archives about getting started and
> >> submitted two small patches. I have tried to understand the test
> >> infrastructure and will like to add some tests or fix some of the
> >> existing tests.
> >> It'll be great if someone can suggest either some tests or any other
> >> small bug-fix that I can work upon.
> >> Thanks :)
> >
> > I think write netlink socket parser is suited for you. This is a GSoC 2016
> > and 2017 project. The part of netfilter has not implemented yet.
> > I working on it, but recent I am busy. If you are interested in it, please
> > tell me.
> >
> Yes, definitely. I'm interested.
> How should I start with the project ? (Any guidance will be
> appreciated, meanwhile I'll try to go through your code in strace.)
> Can you assign me a small task in the project ?
> Thanks for your time. :')
300d9f1f: Further decode some attributes.
37dfe8c7: Implement a small protocol.
You can read these commits to get some idea. I recommend you to decode libudev
netlink header (struct udev_monitor_netlink_header).
systemd/src/libudev/libudev-monitor.c: 76
struct udev_monitor_netlink_header {
/* "libudev" prefix to distinguish libudev and kernel messages */
char prefix[8];
/*
* magic to protect against daemon <-> library message format mismatch
* used in the kernel from socket filter rules; needs to be stored in network order
*/
unsigned int magic;
/* total length of header structure known to the sender */
unsigned int header_size;
/* properties string buffer */
unsigned int properties_off;
unsigned int properties_len;
/*
* hashes of primary device properties strings, to let libudev subscribers
* use in-kernel socket filters; values need to be stored in network order
*/
unsigned int filter_subsystem_hash;
unsigned int filter_devtype_hash;
unsigned int filter_tag_bloom_hi;
unsigned int filter_tag_bloom_lo;
};
Netlink overview and its strace parsers:
http://blog.saruta.eu/netlink_strace.html
>
> > More information:
> >
> > strace GSoC 2017 netlink socket parsers:
> > https://ppiao.github.io/2017/08/22/strace-gsoc-2017-netlink-socket-parser.html
> >
> > My current work of netfilter parser:
> > (Need to fix.)
> > https://github.com/ppiao/strace
> >
--
Chen Jingpiao
|
|
From: Eugene S. <ev...@gm...> - 2017-12-25 18:19:42
|
On Mon, Dec 25, 2017 at 5:06 PM, Kommuru jai shankar reddy <kom...@gm...> wrote: > Hello, > I'm jaya shankar,. Computer science student of national institute of > technology andhra pradesh, India > I have used strace for my mini project for tracing system calls of malware > executables and it helped me a lot. > I want to contribute to the community and apply as student for GSOC 2k18. > I'm having knowledge of kernel, C, git and basics of networking. > So, it would be great if any one suggest me some tasks for micro projects > for gsoc, some bugs to fix for a beginner like me. Thank you for showing interest in strace. Please take a look at [1], [2], and [3] as starting points. As Chen JingPiao also noted recently [4], there is an ongoing effort to add netlink protocol decoding support to strace, which may be of interest, taking in account aforementioned background. If you have any specific questions, don't hesitate to ask. [1] https://sourceforge.net/p/strace/wiki/Guide%20for%20new%20contributors/ [2] https://sourceforge.net/p/strace/wiki/Microprojects/ [3] https://sourceforge.net/p/strace/wiki/FeatureRequests/ [4] https://sourceforge.net/p/strace/mailman/message/36168713/ -- Eugene Syromyatnikov mailto:ev...@gm... xmpp:esyr@jabber.{ru|org} |
|
From: Kommuru j. s. r. <kom...@gm...> - 2017-12-25 17:06:27
|
Hello,
I'm jaya shankar,. Computer science student of national institute of
technology andhra pradesh, India
I have used strace for my mini project for tracing system calls of malware
executables and it helped me a lot.
I want to contribute to the community and apply as student for GSOC 2k18.
I'm having knowledge of kernel, C, git and basics of networking.
So, it would be great if any one suggest me some tasks for micro projects
for gsoc, some bugs to fix for a beginner like me.
Early thanks for your time and response.
|
|
From: Harsha S. <har...@gm...> - 2017-12-25 16:56:20
|
On Mon, Dec 25, 2017 at 6:51 PM, JingPiao Chen <che...@gm...> wrote: > On 12/25 06:12, Harsha Sharma wrote: >> Hello everyone, > > Hi. > >> I'm Harsha Sharma, a sophomore student at Indian Institute of >> Technology, Roorkee, India. >> I have knowledge of C, git, shell programming, kernel programming, gdb >> and parsers and currently working as outreachy intern in Linux-kernel >> (project nftables - Network filtration tool). >> Strace is one of my favorite tools in linux and want to contribute to >> the community. >> I have looked into the mail archives about getting started and >> submitted two small patches. I have tried to understand the test >> infrastructure and will like to add some tests or fix some of the >> existing tests. >> It'll be great if someone can suggest either some tests or any other >> small bug-fix that I can work upon. >> Thanks :) > > I think write netlink socket parser is suited for you. This is a GSoC 2016 > and 2017 project. The part of netfilter has not implemented yet. > I working on it, but recent I am busy. If you are interested in it, please > tell me. > Yes, definitely. I'm interested. How should I start with the project ? (Any guidance will be appreciated, meanwhile I'll try to go through your code in strace.) Can you assign me a small task in the project ? Thanks for your time. :') > More information: > > strace GSoC 2017 netlink socket parsers: > https://ppiao.github.io/2017/08/22/strace-gsoc-2017-netlink-socket-parser.html > > My current work of netfilter parser: > (Need to fix.) > https://github.com/ppiao/strace > > -- > Chen Jingpiao > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Strace-devel mailing list > Str...@li... > https://lists.sourceforge.net/lists/listinfo/strace-devel |
|
From: JingPiao C. <che...@gm...> - 2017-12-25 13:24:01
|
On 12/25 06:12, Harsha Sharma wrote: > Hello everyone, Hi. > I'm Harsha Sharma, a sophomore student at Indian Institute of > Technology, Roorkee, India. > I have knowledge of C, git, shell programming, kernel programming, gdb > and parsers and currently working as outreachy intern in Linux-kernel > (project nftables - Network filtration tool). > Strace is one of my favorite tools in linux and want to contribute to > the community. > I have looked into the mail archives about getting started and > submitted two small patches. I have tried to understand the test > infrastructure and will like to add some tests or fix some of the > existing tests. > It'll be great if someone can suggest either some tests or any other > small bug-fix that I can work upon. > Thanks :) I think write netlink socket parser is suited for you. This is a GSoC 2016 and 2017 project. The part of netfilter has not implemented yet. I working on it, but recent I am busy. If you are interested in it, please tell me. More information: strace GSoC 2017 netlink socket parsers: https://ppiao.github.io/2017/08/22/strace-gsoc-2017-netlink-socket-parser.html My current work of netfilter parser: (Need to fix.) https://github.com/ppiao/strace -- Chen Jingpiao |
|
From: Masatake Y. <ya...@re...> - 2017-12-25 13:04:58
|
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 <ya...@re...> wrote: > I'm planning to link 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. They are conflicts the functions having the same > names in strace. Newly introduced macors(strace_calloc 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 <ya...@re...> > --- > xmalloc.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/xmalloc.h b/xmalloc.h > index d1feeb91..89234e20 100644 > --- a/xmalloc.h > +++ b/xmalloc.h > @@ -36,6 +36,8 @@ > #include <stddef.h> > #include "gcc_compat.h" > > +#define xcalloc strace_calloc > +#define xmalloc strace_malloc > void *xcalloc(size_t nmemb, size_t size) > ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1, 2)); > void *xmalloc(size_t size) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); > -- > 2.14.3 > |
|
From: Dmitry V. L. <ld...@al...> - 2017-12-25 12:49:41
|
On Sun, Dec 24, 2017 at 12:31:36PM +0530, Harsha Sharma wrote: > * tests/run.sh: execute timeout command only when invoked with an > argument else print an error message > > Changes in v2: > * Change commit and log message > * Print error to stderr and exit with 1 > > Signed-off-by: Harsha Sharma <har...@gm...> > --- > tests/run.sh | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tests/run.sh b/tests/run.sh > index d1b796ca..9a98c563 100755 > --- a/tests/run.sh > +++ b/tests/run.sh > @@ -9,4 +9,9 @@ TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION" > $TIMEOUT true > /dev/null 2>&1 || > TIMEOUT= > > -exec $TIMEOUT "$@" > +if [ $# -eq 0 ];then > + echo "No command or test-file specified" 1>&2 > + exit 1 > +else > + exec $TIMEOUT "$@" > +fi Applied with very minor tweaks, thanks. -- ldv |
|
From: Harsha S. <har...@gm...> - 2017-12-25 12:42:27
|
Hello everyone, I'm Harsha Sharma, a sophomore student at Indian Institute of Technology, Roorkee, India. I have knowledge of C, git, shell programming, kernel programming, gdb and parsers and currently working as outreachy intern in Linux-kernel (project nftables - Network filtration tool). Strace is one of my favorite tools in linux and want to contribute to the community. I have looked into the mail archives about getting started and submitted two small patches. I have tried to understand the test infrastructure and will like to add some tests or fix some of the existing tests. It'll be great if someone can suggest either some tests or any other small bug-fix that I can work upon. Thanks :) Regards, Harsha Sharma |
|
From: Harsha S. <har...@gm...> - 2017-12-24 07:02:10
|
* tests/run.sh: execute timeout command only when invoked with an argument else print an error message Changes in v2: * Change commit and log message * Print error to stderr and exit with 1 Signed-off-by: Harsha Sharma <har...@gm...> --- tests/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index d1b796ca..9a98c563 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -9,4 +9,9 @@ TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION" $TIMEOUT true > /dev/null 2>&1 || TIMEOUT= -exec $TIMEOUT "$@" +if [ $# -eq 0 ];then + echo "No command or test-file specified" 1>&2 + exit 1 +else + exec $TIMEOUT "$@" +fi -- 2.11.0 |
|
From: Dmitry V. L. <ld...@al...> - 2017-12-23 23:12:47
|
On Sun, Dec 24, 2017 at 01:31:49AM +0530, Harsha Sharma wrote: > On Sat, Dec 23, 2017 at 4:12 AM, Dmitry V. Levin <ld...@al...> wrote: [...] > > Why do you think this change is useful? > > > Executing this script without any argument gives 'Try 'timeout --help' > for more information.' which should not be the case. So the error diagnostics of tests/run.sh itself is misleading. > > tests/run.sh is a part of test infrastructure, > > is it natural to invoke this script without arguments? > > > No, but can help someone using it for first time. OK. > This patch can be dropped if change doesn't seem to be useful. > Thanks for your review. No, there hasn't been a review yet, I was just curious about the purpose of this patch. The review follows. > Subject: [PATCH] tests: enhance error diagostics s/diagostics/diagnostics/ let's be more specific, e.g. tests: enhance run.sh usage error diagnostics > * tests/init.sh: execute timeout command only when run with argument s/run with argument/invoked with an argument/ > else print error "No command or test file specified" No need to duplicate the change in the commit message, in particular, no need to cite the text of error diagnostics. > Signed-off-by: Harsha Sharma <har...@gm...> > --- > tests/run.sh | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tests/run.sh b/tests/run.sh > index d1b796ca..6ff69b4d 100755 > --- a/tests/run.sh > +++ b/tests/run.sh > @@ -9,4 +9,8 @@ TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION" > $TIMEOUT true > /dev/null 2>&1 || > TIMEOUT= > > -exec $TIMEOUT "$@" > +if [ $# -eq 0 ]; then > + echo "No command or test file specified" Error diagnostics should be printed to stderr. If it's an error condition, the program should exit with a non-zero status. > +else > + exec $TIMEOUT "$@" > +fi -- ldv |
|
From: Harsha S. <har...@gm...> - 2017-12-23 20:01:56
|
On Sat, Dec 23, 2017 at 4:12 AM, Dmitry V. Levin <ld...@al...> wrote: > > On Sat, Dec 23, 2017 at 02:34:31AM +0530, Harsha Sharma wrote: > > * tests/init.sh: execute timeout command only when run with argument > > else print error "No command or test file specified" > > > > Signed-off-by: Harsha Sharma <har...@gm...> > > --- > > tests/run.sh | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/tests/run.sh b/tests/run.sh > > index d1b796ca..6ff69b4d 100755 > > --- a/tests/run.sh > > +++ b/tests/run.sh > > @@ -9,4 +9,8 @@ TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION" > > $TIMEOUT true > /dev/null 2>&1 || > > TIMEOUT= > > > > -exec $TIMEOUT "$@" > > +if [ $# -eq 0 ]; then > > + echo "No command or test file specified" > > +else > > + exec $TIMEOUT "$@" > > +fi > > Why do you think this change is useful? > Executing this script without any argument gives 'Try 'timeout --help' for more information.' which should not be the case. > tests/run.sh is a part of test infrastructure, > is it natural to invoke this script without arguments? > No, but can help someone using it for first time. This patch can be dropped if change doesn't seem to be useful. Thanks for your review. Regards, Harsha Sharma > > -- > ldv > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Strace-devel mailing list > Str...@li... > https://lists.sourceforge.net/lists/listinfo/strace-devel > |
|
From: Dmitry V. L. <ld...@al...> - 2017-12-22 22:42:17
|
On Sat, Dec 23, 2017 at 02:34:31AM +0530, Harsha Sharma wrote: > * tests/init.sh: execute timeout command only when run with argument > else print error "No command or test file specified" > > Signed-off-by: Harsha Sharma <har...@gm...> > --- > tests/run.sh | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tests/run.sh b/tests/run.sh > index d1b796ca..6ff69b4d 100755 > --- a/tests/run.sh > +++ b/tests/run.sh > @@ -9,4 +9,8 @@ TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION" > $TIMEOUT true > /dev/null 2>&1 || > TIMEOUT= > > -exec $TIMEOUT "$@" > +if [ $# -eq 0 ]; then > + echo "No command or test file specified" > +else > + exec $TIMEOUT "$@" > +fi Why do you think this change is useful? tests/run.sh is a part of test infrastructure, is it natural to invoke this script without arguments? -- ldv |
|
From: Harsha S. <har...@gm...> - 2017-12-22 21:05:45
|
* tests/init.sh: execute timeout command only when run with argument else print error "No command or test file specified" Signed-off-by: Harsha Sharma <har...@gm...> --- tests/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index d1b796ca..6ff69b4d 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -9,4 +9,8 @@ TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION" $TIMEOUT true > /dev/null 2>&1 || TIMEOUT= -exec $TIMEOUT "$@" +if [ $# -eq 0 ]; then + echo "No command or test file specified" +else + exec $TIMEOUT "$@" +fi -- 2.11.0 |
|
From: Dmitry V. L. <ld...@al...> - 2017-12-21 16:26:05
|
On Wed, Dec 20, 2017 at 11:03:01PM +0530, Harsha Sharma wrote: > Replace if (debug_flag) error_msg(...) with debug_msg debug printing macro Applied, thanks. -- ldv |
|
From: Harsha S. <har...@gm...> - 2017-12-20 17:33:45
|
Replace if (debug_flag) error_msg(...) with debug_msg debug printing macro
Signed-off-by: Harsha Sharma <har...@gm...>
---
syscall.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/syscall.c b/syscall.c
index b1047feb..1deeff2e 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1211,9 +1211,8 @@ get_scno(struct tcb *tcp)
set_tcb_priv_data(tcp, s, free_sysent_buf);
- if (debug_flag)
- error_msg("pid %d invalid syscall %" PRI_kld,
- tcp->pid, tcp->scno);
+ debug_msg("pid %d invalid syscall %" PRI_kld, tcp->pid,
+ tcp->scno);
}
return 1;
}
--
2.11.0
|
|
From: Masatake Y. <ya...@re...> - 2017-12-18 04:25:12
|
This patch is for demangling c++ symbols appeared in stack trace
with using cplus_demangle function in GNU libiberty library.
This is an example of output of demangled stack trace:
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
> /usr/lib64/libc-2.25.so(__fxstat64+0x12) [0xffd62]
> /usr/lib64/libc-2.25.so(_IO_file_doallocate+0x5f) [0x717ff]
> /usr/lib64/libc-2.25.so(_IO_doallocbuf+0x79) [0x81699]
> /usr/lib64/libc-2.25.so(_IO_file_overflow+0x198) [0x807b8]
> /usr/lib64/libc-2.25.so(_IO_file_xsputn+0xbd) [0x7ed5d]
> /usr/lib64/libc-2.25.so(fwrite_unlocked+0x60) [0x7d800]
> /usr/lib64/libleveldb.so.1.18(leveldb::EnvWrapper::StartThread+0x3b6) [0x48656]
> /usr/lib64/libleveldb.so.1.18(leveldb::log::Writer::EmitPhysicalRecord+0x89) [0x28bc9]
> /usr/lib64/libleveldb.so.1.18(leveldb::log::Writer::AddRecord+0x9e) [0x28d9e]
> /usr/lib64/libleveldb.so.1.18(leveldb::DBImpl::Write+0x208) [0x1ce18]
> /usr/lib64/libleveldb.so.1.18(leveldb::DB::Put+0x59) [0x192b9]
> /usr/lib64/libleveldb.so.1.18(leveldb::DBImpl::Put+0x1d) [0x1931d]
> /home/yamato/var/leveldb/doc/a.out(main+0x120) [0x1107]
> /usr/lib64/libc-2.25.so(__libc_start_main+0xea) [0x2088a]
> /home/yamato/var/leveldb/doc/a.out(_start+0x2a) [0xf3a]
The names of leveldb related symbols are demangled well.
* Makefile.am (libiberty_CPPFLAGS): New macro
appended to strace_CPPFLAGS if USE_DEMANGLE is defined.
(libiberty_LDFLAGS): New macro appended 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.
Signed-off-by: Masatake YAMATO <ya...@re...>
---
Makefile.am | 5 +++++
configure.ac | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
unwind.c | 17 +++++++++++++++++
3 files changed, 73 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index c04125ec..b5512741 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -333,6 +333,11 @@ strace_SOURCES += unwind.c
strace_CPPFLAGS += $(libunwind_CPPFLAGS)
strace_LDFLAGS += $(libunwind_LDFLAGS)
strace_LDADD += $(libunwind_LIBS)
+if USE_DEMANGLE
+strace_CPPFLAGS += $(libiberty_CPPFLAGS)
+strace_LDFLAGS += $(libiberty_LDFLAGS)
+strace_LDADD += $(libiberty_LIBS)
+endif
endif
@CODE_COVERAGE_RULES@
diff --git a/configure.ac b/configure.ac
index 729ef3f7..e2a5d97a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -883,6 +883,57 @@ fi
AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes])
AC_MSG_RESULT([$use_libunwind])
+dnl demangling symbols in the stack trace
+AC_ARG_WITH([libiberty],
+ [AS_HELP_STRING([--with-libiberty],
+ [use libiberty to demangle symbols in stack trace])],
+ [case "${withval}" in
+ yes|no|check) ;;
+ *) with_libiberty=yes
+ libiberty_CPPFLAGS="-I${withval}/include"
+ libiberty_LDFLAGS="-L${withval}/lib" ;;
+ esac],
+ [with_libiberty=check]
+)
+
+use_libiberty=no
+AS_IF([test "x$use_libunwind" = xyes && test "x$with_libiberty" != xno],
+ [saved_CPPFLAGS="$CPPFLAGS"
+ CPPFALGS="$CPPFLAGS $libiberty_CPPFLAGS"
+ AC_CHECK_HEADERS([demangle.h],
+ [saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $libiberty_LDFLAGS"
+ AC_CHECK_LIB([iberty],[cplus_demangle],
+ [libiberty_LIBS="-liberty"
+ use_libiberty=yes
+ ],
+ [if test "x$with_libiberty" != xcheck; then
+ AC_MSG_FAILURE([failed to find cplus_demangle in libiberty])
+ fi
+ ]
+ )
+ LDFLAGS="$saved_LDFLAGS"
+ ],
+ [if test "x$with_libiberty" != xcheck; then
+ AC_MSG_FAILURE([failed to find demangle.h])
+ fi
+ ]
+ )
+ CPPFLAGS="$saved_CPPFLAGS"
+ ]
+)
+
+dnl enable libiberty
+AC_MSG_CHECKING([whether to enable demangling symbols in stack trace])
+if test "x$use_libiberty" = xyes; then
+ AC_DEFINE([USE_DEMANGLE], 1, [Do demangling symbols in stack trace])
+ AC_SUBST(libiberty_LIBS)
+ AC_SUBST(libiberty_LDFLAGS)
+ AC_SUBST(libiberty_CPPFLAGS)
+fi
+AM_CONDITIONAL([USE_DEMANGLE], [test "x$use_libiberty" = xyes])
+AC_MSG_RESULT([$use_libiberty])
+
if test "$arch" = mips && test "$no_create" != yes; then
mkdir -p linux/mips
if $srcdir/linux/mips/genstub.sh linux/mips; then
diff --git a/unwind.c b/unwind.c
index c097e875..7168810c 100644
--- a/unwind.c
+++ b/unwind.c
@@ -29,6 +29,10 @@
#include <limits.h>
#include <libunwind-ptrace.h>
+#ifdef USE_DEMANGLE
+#include <demangle.h>
+#endif
+
#ifdef _LARGEFILE64_SOURCE
# ifdef HAVE_FOPEN64
# define fopen_for_input fopen64
@@ -325,11 +329,24 @@ print_stack_frame(struct tcb *tcp,
&function_offset);
true_offset = ip - cur_mmap_cache->start_addr +
cur_mmap_cache->mmap_offset;
+
+#ifdef USE_DEMANGLE
+ char *demangled_name = cplus_demangle (*symbol_name, 0);
+#endif
+
call_action(data,
cur_mmap_cache->binary_filename,
+#ifdef USE_DEMANGLE
+ demangled_name? demangled_name: *symbol_name,
+#else
*symbol_name,
+#endif
function_offset,
true_offset);
+#ifdef USE_DEMANGLE
+ free (demangled_name);
+#endif
+
return 0;
} else if (ip < cur_mmap_cache->start_addr)
upper = mid - 1;
--
2.14.3
|