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, 23 Sep 2016 14:14:03 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        vince@...ter.net, eranian@...gle.com,
        Arnaldo Carvalho de Melo <acme@...radead.org>,
        tglx@...utronix.de, ak@...ux.intel.com
Subject: Re: [RFC PATCH 1/6] perf: Move mlock accounting to ring buffer
 allocation

On Fri, Sep 23, 2016 at 02:27:21PM +0300, Alexander Shishkin wrote:
> In order to be able to allocate perf ring buffers in non-mmap path, we
> need to make sure we can still account the memory to the user and that
> they don't exceed their mlock limit.
> 
> This patch moves ring buffer memory accounting down the rb_alloc() path
> so that its callers won't have to worry about it. This also serves the
> additional purpose of slightly cleaning up perf_mmap().

While I like a cleanup of that code (it really can use one), I'm not a
big fan of hidden buffers like this. Why is this needed?

A quick look through the patches also leaves me wondering on the design
and interface of this thing. A few words explaining the overall design
would be nice.

Afaict there's no actual need to hide the AUX buffer for this sampling
stuff; the user knows about all this and can simply mmap() the AUX part.
The sample could either point to locations in the AUX buffer, or (as I
think this code does) memcpy bits out.

Ideally we'd pass the AUX-event into the syscall, that way you avoid all
the find_aux_event crud. I'm not sure we want to overload the group_fd
thing more (its already very hard to create counter groups in a cgroup
for example) ..

Coredump was mentioned somewhere, but I'm not sure I've seen
code/interfaces for that. How was that envisioned to work?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ