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: <CALcN6mhCpTBvcO2Xt4388HMY0a1KLoJFM=4N2mQ3E91rp3g2fg@mail.gmail.com>
Date:   Wed, 12 Apr 2017 09:34:37 -0700
From:   David Carrillo-Cisneros <davidcc@...gle.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid
 sorting key

> On Tue, Apr 11, 2017 at 11:49:17PM -0700, David Carrillo-Cisneros wrote:
>> My fat-fingering of sort keys in .perfconfig was a common cause of
>> perf report silently terminating without apparent error.
>>
>> This was because 1) error in setup_sorting in cmd_report was ignored
>> and 2) no message was log in UI browser that would prevent UI from
>> exit before user prompt. Fix both.
>
> there's UI init ahead of this code.. I had to move it
> below your code to spot any error message
>
> there's other errors further on.. perhaps we should move it even further ;-)
> or cancel the ui before the error is printed

Probably canceling ui on error is the more robust way to go. I will
look into it.

Thanks,
David

>
> jirka
>
>
> ---
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 19a69ca0e9c9..abcf3aadca9e 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -982,11 +982,6 @@ int cmd_report(int argc, const char **argv)
>         if (report.header || report.header_only || report.show_threads)
>                 use_browser = 0;
>
> -       if (strcmp(input_name, "-") != 0)
> -               setup_browser(true);
> -       else
> -               use_browser = 0;
> -
>         ret = setup_sorting(session->evlist);
>         if (ret < 0) {
>                 if (sort_order)
> @@ -999,6 +994,11 @@ int cmd_report(int argc, const char **argv)
>                 goto error;
>         }
>
> +       if (strcmp(input_name, "-") != 0)
> +               setup_browser(true);
> +       else
> +               use_browser = 0;
> +
>         if ((report.header || report.header_only) && !quiet) {
>                 perf_session__fprintf_info(session, stdout,
>                                            report.show_full_info);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ