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:	Fri, 08 Nov 2013 07:41:03 -0700
From:	David Ahern <dsahern@...il.com>
To:	Adrian Hunter <adrian.hunter@...el.com>
CC:	acme@...stprotocols.net, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH] perf tool: Round mmap pages to power 2

On 11/8/13, 2:11 AM, Adrian Hunter wrote:
> This prevents:
>
>      --out-pages=0
>
> from working e.g.
>
>      tools/perf/perf record -vv --out-pages=0 uname
>      rounding mmap pages size to 4096 (1 pages)
>
> Although without this patch:
>
>      tools/perf/perf record -vv --out-pages=0 uname
>      --mmap_pages/-m value must be a power of two.
>       usage: perf record [<options>] [<command>]
>          or: perf record [<options>] -- <command> [<options>]
>
>              --out-pages <pages>
>                            Number of pages or size with units to use for
> output (default 64M)
>
> Also there is:
>
>      tools/perf/perf record -vv --no-out-pages uname
>      Segmentation fault (core dumped)

This is problem with perf_evlist__parse_mmap_pages(); same thing happens 
with --no-map-pages.

With the attached both round a 0 up to 1 page:

[daahern@...s-vdc-dev3 perf]$ perf record --out-pages 0 uname
rounding mmap pages size to 4096 (1 pages)
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.008 MB perf.data (~339 samples) ]

[daahern@...s-vdc-dev3 perf]$ perf record --mmap-pages 0 uname
rounding mmap pages size to 4096 (1 pages)
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.008 MB perf.data (~339 samples) ]

[daahern@...s-vdc-dev3 perf]$ perf record --no-mmap-pages uname

  usage: perf record [<options>] [<command>]
     or: perf record [<options>] -- <command> [<options>]

     -m, --mmap-pages <pages>
                           number of mmap data pages
David


View attachment "0001-perf-record-Fix-segfault-with-no-mmap-pages.patch" of type "text/plain" (1185 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ