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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190415174631.471a8e87@gandalf.local.home>
Date:   Mon, 15 Apr 2019 17:46:31 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Raul E Rangel <rrangel@...omium.org>
Cc:     linux-trace-devel@...r.kernel.org, eballetbo@...il.com,
        zwisler@...omium.org, djkurtz@...omium.org,
        Ross Zwisler <zwisler@...gle.com>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        linux-kernel@...r.kernel.org, Benson Leung <bleung@...omium.org>
Subject: Re: [PATCH v5] chrome/platform: cros_ec_proto: Add trace event to
 trace EC commands

On Mon, 15 Apr 2019 14:57:04 -0600
Raul E Rangel <rrangel@...omium.org> wrote:

> This is useful to see which EC commands are being executed and when.
> 
> To enable:
> 
>     echo 'cros_ec:*' >> /sys/kernel/debug/tracing/set_event

Note, you can accomplish the same thing with:

  echo 1 > /sys/kernel/debug/tracing/events/cros_ec/enable

That's the "new" way to do things. The set_event only hangs around for
historical (and compatibility) reasons.


> 
> Example:
> 
>     /* cros_ec_cmd: version: 0, command: EC_CMD_GET_VERSION */
>     /* cros_ec_cmd: version: 0, command: EC_CMD_GET_PROTOCOL_INFO */
>     /* cros_ec_cmd: version: 1, command: EC_CMD_GET_CMD_VERSIONS */
>     /* cros_ec_cmd: version: 1, command: EC_CMD_USB_PD_CONTROL */
> 
> Signed-off-by: Raul E Rangel <rrangel@...omium.org>
> Reviewed-by: Ross Zwisler <zwisler@...gle.com>

For the tracing side of things:

Reviewed-by: Steven Rostedt (VMware) <rostedt@...dmis.org>

-- Steve

> ---
> 
> Changes in v5:
> - Rebased on upstream/master. It turns out upstream/master is missing a
>   lot of changes to cros_ec_commands.h.
> - Replace SYM with SYMBOL in macro name.
> 
> Changes in v4:
> - Use the full command name so go to definition continues to work in my
> editor.
> 
> Changes in v3:
> - Use a macro to avoid duplicating the ec command names.
> 
> Changes in v2:
> - Changed comment style to match other cros_ec files.
> - Fixed commit tag.
> 
>  drivers/platform/chrome/Makefile        |   4 +-
>  drivers/platform/chrome/cros_ec_proto.c |   4 +
>  drivers/platform/chrome/cros_ec_trace.c | 121 ++++++++++++++++++++++++
>  drivers/platform/chrome/cros_ec_trace.h |  51 ++++++++++
>  4 files changed, 179 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/platform/chrome/cros_ec_trace.c
>  create mode 100644 drivers/platform/chrome/cros_ec_trace.h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ