From: Al Viro <viro@ZenIV.linux.org.uk>
To: Stephane Eranian <eranian@google.com>
Cc: willy@infradead.org,
Linus Torvalds <torvalds@linux-foundation.org>,
hch@infradead.org, LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, "Luck, Tony" <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
linux-ia64@vger.kernel.org
Subject: Re: perfmon trouble
Date: Mon, 11 Jun 2018 20:06:01 +0000 [thread overview]
Message-ID: <20180611200601.GW30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CABPqkBTwqtFxtFsCjTNyHa_T1_vCbCQWHwo42RZAbg0QRi1BFw@mail.gmail.com>
On Mon, Jun 11, 2018 at 11:51:34AM -0700, Stephane Eranian wrote:
> Thanks Al for the careful analysis. If I understand correctly, the
> problem seems to be that on
> execve the mapping of the sampling buffer is not destroyed and then on
> close, the kernel
> unmaps whatever the new binary had in that address range. The fix
> would be to ensure
> the mmap is destroyed on execve.
mmap *is* destroyed on execve; it's just that perfmon doesn't notice and
then tries to destroy it again on close, nevermind that it's a different
process, different mapping, etc.
> My problem is that I do not have IA64 hw anymore, so whatever the fix,
> I will not be able
> to test this. In the meantime, I agree with Matthew, simply disable
> PERFMON support.
Out of curiosity - what happened to never-went-into-mainline rewrite
of perfmon circa 2008? perfmon2 sourceforget site has a collection
of those, up to 2.6.29; AFAICS, they did have a somewhat saner syscall
interface (no auto-mmap on creation, no auto-munmap attempts on close).
By this point it obviously would've been too late to resurrect anyway,
but I wonder what happened with it...
WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Stephane Eranian <eranian@google.com>
Cc: willy@infradead.org,
Linus Torvalds <torvalds@linux-foundation.org>,
hch@infradead.org, LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, "Luck, Tony" <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
linux-ia64@vger.kernel.org
Subject: Re: perfmon trouble
Date: Mon, 11 Jun 2018 21:06:01 +0100 [thread overview]
Message-ID: <20180611200601.GW30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CABPqkBTwqtFxtFsCjTNyHa_T1_vCbCQWHwo42RZAbg0QRi1BFw@mail.gmail.com>
On Mon, Jun 11, 2018 at 11:51:34AM -0700, Stephane Eranian wrote:
> Thanks Al for the careful analysis. If I understand correctly, the
> problem seems to be that on
> execve the mapping of the sampling buffer is not destroyed and then on
> close, the kernel
> unmaps whatever the new binary had in that address range. The fix
> would be to ensure
> the mmap is destroyed on execve.
mmap *is* destroyed on execve; it's just that perfmon doesn't notice and
then tries to destroy it again on close, nevermind that it's a different
process, different mapping, etc.
> My problem is that I do not have IA64 hw anymore, so whatever the fix,
> I will not be able
> to test this. In the meantime, I agree with Matthew, simply disable
> PERFMON support.
Out of curiosity - what happened to never-went-into-mainline rewrite
of perfmon circa 2008? perfmon2 sourceforget site has a collection
of those, up to 2.6.29; AFAICS, they did have a somewhat saner syscall
interface (no auto-mmap on creation, no auto-munmap attempts on close).
By this point it obviously would've been too late to resurrect anyway,
but I wonder what happened with it...
next prev parent reply other threads:[~2018-06-11 20:06 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 18:48 [RFC][PATCHES] getting rid of int *open in ->atomic_open() and friends Al Viro
2018-06-08 18:50 ` [PATCH 01/13] drm_mode_create_lease_ioctl(): switch to filp_clone_open() Al Viro
2018-06-08 18:50 ` [PATCH 02/13] rename filp_clone_open() to file_clone_open() Al Viro
2018-06-08 18:50 ` [PATCH 03/13] introduce FMODE_OPENED Al Viro
2018-06-08 18:50 ` [PATCH 04/13] get rid of 'opened' argument of finish_open() Al Viro
2018-06-08 18:50 ` [PATCH 05/13] pull fput() on late failures into path_openat() Al Viro
2018-06-08 18:50 ` [PATCH 06/13] switch all remaining checks for FILE_OPENED to FMODE_OPENED Al Viro
2018-06-08 18:50 ` [PATCH 07/13] now we can fold open_check_o_direct() into do_dentry_open() Al Viro
2018-06-08 18:50 ` [PATCH 08/13] __gfs2_lookup(), nfs_finish_open() and fuse_create_open() don't need 'opened' Al Viro
2018-06-08 18:50 ` [PATCH 09/13] introduce FMODE_CREATED and switch to it Al Viro
2018-06-08 18:50 ` [PATCH 10/13] IMA: don't propagate opened through the entire thing Al Viro
2018-06-08 18:50 ` [PATCH 11/13] gfs2_create_inode() doesn't need 'opened' anymore Al Viro
2018-06-08 18:50 ` [PATCH 12/13] get rid of 'opened' argument of ->atomic_open() Al Viro
2018-06-08 18:50 ` [PATCH 13/13] get rid of 'opened' in path_openat() and the helpers downstream Al Viro
2018-06-08 18:57 ` [RFC][PATCHES] getting rid of int *open in ->atomic_open() and friends Linus Torvalds
2018-06-09 5:10 ` Al Viro
2018-06-09 5:10 ` Al Viro
2018-06-09 15:51 ` Al Viro
2018-06-11 2:10 ` perfmon trouble Al Viro
2018-06-11 16:23 ` Christoph Hellwig
2018-06-11 16:48 ` Matthew Wilcox
2018-06-11 17:04 ` Linus Torvalds
2018-06-11 17:18 ` Matthew Wilcox
2018-06-11 17:18 ` Matthew Wilcox
2018-06-11 18:51 ` Stephane Eranian
2018-06-11 18:51 ` Stephane Eranian
2018-06-11 18:59 ` Linus Torvalds
2018-06-11 18:59 ` Linus Torvalds
2018-06-11 20:06 ` Al Viro [this message]
2018-06-11 20:06 ` Al Viro
2018-06-17 18:22 ` [RFC][PATCHES] getting rid of int *open in ->atomic_open() and friends Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180611200601.GW30522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.