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]
Date:   Wed, 25 Aug 2021 08:00:50 -0700
From:   Guenter Roeck <groeck@...gle.com>
To:     Gwendal Grignou <gwendal@...omium.org>
Cc:     Benson Leung <bleung@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_trace: Fix format warnings

On Mon, Aug 23, 2021 at 1:01 PM Gwendal Grignou <gwendal@...omium.org> wrote:
>
> Fix printf format issues in new tracing events.
>
> Fixes: 814318242 ("platform/chrome: cros_ec_trace: Add fields to command traces")
>
> Signed-off-by: Gwendal Grignou <gwendal@...omium.org>
> ---
>  drivers/platform/chrome/cros_ec_trace.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_trace.h b/drivers/platform/chrome/cros_ec_trace.h
> index f50b9f9b8610..a2052db55671 100644
> --- a/drivers/platform/chrome/cros_ec_trace.h
> +++ b/drivers/platform/chrome/cros_ec_trace.h
> @@ -92,7 +92,7 @@ TRACE_EVENT(cros_ec_sensorhub_timestamp,
>                 __entry->current_time = current_time;
>                 __entry->delta = current_timestamp - current_time;
>         ),
> -       TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> +       TP_printk("ec_ts: %9d, ec_fifo_ts: %9d, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",

Should that be %u (the variables are u32) ?

>                   __entry->ec_sample_timestamp,
>                 __entry->ec_fifo_timestamp,
>                 __entry->fifo_timestamp,
> @@ -122,7 +122,7 @@ TRACE_EVENT(cros_ec_sensorhub_data,
>                 __entry->current_time = current_time;
>                 __entry->delta = current_timestamp - current_time;
>         ),
> -       TP_printk("ec_num: %4d, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> +       TP_printk("ec_num: %4d, ec_fifo_ts: %9d, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",

Same here.

Thanks,
Guenter

>                   __entry->ec_sensor_num,
>                 __entry->ec_fifo_timestamp,
>                 __entry->fifo_timestamp,
> @@ -153,7 +153,7 @@ TRACE_EVENT(cros_ec_sensorhub_filter,
>                 __entry->x = state->x_offset;
>                 __entry->y = state->y_offset;
>         ),
> -       TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %d x: %12lld y: %12lld",
> +       TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %lld x: %12lld y: %12lld",
>                   __entry->dx,
>                 __entry->dy,
>                 __entry->median_m,
> --
> 2.33.0.rc2.250.ged5fa647cd-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ