Messages in this thread | | | From | Alexander Shishkin <> | Subject | Re: [RFC PATCH 01/17] perf: Allow mmapping only user page | Date | Wed, 13 Sep 2017 14:35:42 +0300 |
| |
Borislav Petkov <bp@alien8.de> writes:
> On Tue, Sep 05, 2017 at 04:30:10PM +0300, Alexander Shishkin wrote: >> The 'user page' contains offsets and sizes of data and aux areas of the >> ring buffer. If a user wants to mmap a pre-existing buffer, they need to >> know these in order to issue mmap()s with correct offsets and sizes. > > Ok, stupid question: shouldn't this be a properly defined interface > instead of allowing userspace to poke inside the user page? Or are we > prepared to handle any changes in the layout of that user page and there > won't be any userspace crying because of it?
Well, it is a 'defined' interface: there's the 'struct perf_event_mmap_page' with versioning and whatnot, which is used for all the ring buffer metainformation. Or am I misunderstanding your question?
Thanks, -- Alex
| |