From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751562AbdIMLmI (ORCPT ); Wed, 13 Sep 2017 07:42:08 -0400 Received: from mga04.intel.com ([192.55.52.120]:16260 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbdIMLmH (ORCPT ); Wed, 13 Sep 2017 07:42:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,387,1500966000"; d="scan'208";a="899827771" From: Alexander Shishkin To: Borislav Petkov Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, acme@redhat.com, kirill.shutemov@linux.intel.com, rric@kernel.org Subject: Re: [RFC PATCH 01/17] perf: Allow mmapping only user page In-Reply-To: <20170906162847.7njgdzeioah2wdgm@pd.tnic> References: <20170905133026.13689-1-alexander.shishkin@linux.intel.com> <20170905133026.13689-2-alexander.shishkin@linux.intel.com> <20170906162847.7njgdzeioah2wdgm@pd.tnic> User-Agent: Notmuch/0.23.7 (http://notmuchmail.org) Emacs/25.1.1 (x86_64-pc-linux-gnu) Date: Wed, 13 Sep 2017 14:35:42 +0300 Message-ID: <87d16ux241.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Borislav Petkov 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