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  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:	Thu, 23 Oct 2014 18:47:29 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Wang Nan <wangnan0@...wei.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Namhyung Kim <namhyung.kim@....com>,
	Waiman Long <Waiman.Long@...com>, linux-kernel@...r.kernel.org,
	Li Zefan <lizefan@...wei.com>
Subject: Re: [PATCH] perf tools: ensure return negitive value when write
 header error

Em Wed, Oct 22, 2014 at 04:00:12PM +0900, Namhyung Kim escreveu:
> On Thu, 16 Oct 2014 11:08:29 +0800, Wang Nan wrote:
> > When 'perf record' write headers, it calls write_xxx in
> > tools/perf/util/header.c, and check return value. It rolls back all
> > working only when return value is negative.
> >
> > This patch ensures write_cpudesc() and write_total_mem() return negative number
> > when error. Without this patch, headers reported by 'perf report' header is
> > error in some platform. Following output is caputured on ARM, which doesn't
> > contain "Processor" field in /proc/cpuinfo. See "cpudesc", "total memory" and
> > "cmdline" field.
> >
> >    bash-4.2# perf record ls
> >    ...
> >    [ perf record: Woken up 1 times to write data ]
> >    [ perf record: Captured and wrote 0.001 MB perf.data (~36 samples) ]
> >    bash-4.2# perf report --stdio --header
> >    Error:
> >    The perf.data file has no samples!
> >    # ========
> >    # captured on: Fri Sep 12 10:09:10 2014
> >    # hostname : arma15el
> >    # os release : 3.17.0+
> >    # perf version : 3.10.53
> >    # arch : armv7l
> >    # nrcpus online : 4
> >    # nrcpus avail : 1
> >    # cpudesc : (null)
> >    # total memory : 0 kB
> >    # cmdline :
> >    # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host = 0, excl_guest = 1, precise_ip = 0
> >    # pmu mappings: not available
> >    # ========
> >    #
> >
> > Signed-off-by: Wang Nan <wangnan0@...wei.com>
> 
> I guess the total_memory, cmdline and pmu mappings are somehow affected
> by the broken cpudesc.  Do they have their own problem on ARM?
> 
> Anyway I think it's good to check the result properly, so
> 
> Acked-by: Namhyung Kim <namhyung@...nel.org>

Thanks, applied

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists