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] [day] [month] [year] [list]
Message-ID: <20210410145741.GA6012@leoy-ThinkPad-X240s>
Date:   Sat, 10 Apr 2021 22:57:41 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf session: Dump PERF_RECORD_TIME_CONV event

Hi Adrian,

On Sat, Apr 10, 2021 at 11:46:10AM +0300, Adrian Hunter wrote:

[...]

> Hi Leo
> 
> I think there might be some more work related to this.
> 
> Pedantically, shouldn't you cater for backward compatibility and
> not assume the following were in the perf.data file:
>                                                                                                                                            
>        __u64                    time_cycles;                                                                                                                                             
>        __u64                    time_mask;                                                                                                                                               
>        bool                     cap_user_time_zero;                                                                                                                                      
>        bool                     cap_user_time_short;   
> 
> That means checking the event size.
> 
> Also PERF_RECORD_TIME_CONV should have its own byte-swapper instead of  
> perf_event__all64_swap() - also checking event size.
> 
> i.e. fixes for:
> 
>   commit d110162cafc80dad0622cfd40f3113aebb77e1bb
>   Author: Leo Yan <leo.yan@...aro.org>
>   Date:   Mon Sep 14 19:53:09 2020 +0800
> 
>     perf tsc: Support cap_user_time_short for event TIME_CONV

Indeed!  IIUC, should have three fixes with event size checking:

- One fix for dumping TIME_CONV event;
- One fix for byte-swapper (especially for bool values);
- One fix for commit d110162cafc80dad0622cfd40f3113aebb77e1bb;

Will follow up for the suggestions.  Thanks a lot for your insight
review.

Leo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ