lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 29 Sep 2016 11:11:32 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, hpa@...or.com,
        dsahern@...il.com, williams@...hat.com, mingo@...nel.org,
        adrian.hunter@...el.com, bristot@...hat.com, jolsa@...nel.org,
        wangnan0@...wei.com, rostedt@...dmis.org, namhyung@...nel.org,
        acme@...hat.com
Subject: [tip:perf/core] perf trace: Beautify sched_[gs]et_attr return value

Commit-ID:  f0bbd602268e69f4f428075c645391d64bdd6c9f
Gitweb:     http://git.kernel.org/tip/f0bbd602268e69f4f428075c645391d64bdd6c9f
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Wed, 28 Sep 2016 13:45:38 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 28 Sep 2016 13:48:04 -0300

perf trace: Beautify sched_[gs]et_attr return value

Both return errno, show the string associated then.

More work needed to capture the sched_attr arg to beautify it in turn,
probably using BPF.

Before:

     0.210 ( 0.001 ms): sched_setattr(uattr: 0x7ffc684f02b0) = -22

After the patch, for this sched_attr, all other parms are zero, so not
shown:

        struct sched_attr attr = {
                .size           = sizeof(attr),
                .sched_policy   = SCHED_DEADLINE,
                .sched_runtime  = 10 * USECS_PER_SEC,
                .sched_period   = 30 * USECS_PER_SEC,
                .sched_deadline = attr.sched_period,
        };

     0.321 ( 0.002 ms): sched_setattr(uattr: 0x7ffc44116da0) = -1 EINVAL Invalid argument

  [root@...et c]# perf trace -e sched_setattr ./sched_deadline
  Couldn't negotiate deadline: Invalid argument
     0.229 ( 0.003 ms): sched_setattr(uattr: 0x7ffd8dcd8df0) = -1 EINVAL Invalid argument
  [root@...et c]#

Now to figure out the reason for this EINVAL.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Clark Williams <williams@...hat.com>
Cc: Daniel Bristot de Oliveira <bristot@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-tyot2n7e48zm8pdw8tbcm3sl@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-trace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index b4fc1ab..1a54ce9 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -742,6 +742,8 @@ static struct syscall_fmt {
 	  .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
 	{ .name	    = "rt_tgsigqueueinfo", .errmsg = true,
 	  .arg_scnprintf = { [2] = SCA_SIGNUM, /* sig */ }, },
+	{ .name	    = "sched_getattr",	      .errmsg = true, },
+	{ .name	    = "sched_setattr",	      .errmsg = true, },
 	{ .name	    = "sched_setscheduler",   .errmsg = true,
 	  .arg_scnprintf = { [1] = SCA_SCHED_POLICY, /* policy */ }, },
 	{ .name	    = "seccomp", .errmsg = true,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ