From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753477AbbANPd1 (ORCPT ); Wed, 14 Jan 2015 10:33:27 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:38617 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751410AbbANPd0 (ORCPT ); Wed, 14 Jan 2015 10:33:26 -0500 Date: Wed, 14 Jan 2015 18:33:23 +0300 From: Cyrill Gorcunov To: "Kirill A. Shutemov" Cc: Calvin Owens , Andrew Morton , Alexey Dobriyan , Oleg Nesterov , "Eric W. Biederman" , Al Viro , "Kirill A. Shutemov" , Peter Feiner , Grant Likely , Siddhesh Poyarekar , linux-kernel@vger.kernel.org, kernel-team@fb.com, Pavel Emelyanov Subject: Re: [RFC][PATCH] procfs: Add /proc//mapped_files Message-ID: <20150114153323.GF2253@moon> References: <1421194829-28696-1-git-send-email-calvinowens@fb.com> <20150114152501.GB9820@node.dhcp.inet.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150114152501.GB9820@node.dhcp.inet.fi> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 14, 2015 at 05:25:01PM +0200, Kirill A. Shutemov wrote: ... > > > > This gives lsof and suchlike a way to determine the pathnames of files > > mapped into a process without incurring the O(N^2) behavior of the > > maps file. > > We already have /proc/PID/map_files/ directory which lists all mapped > files. Should we consider relaxing permission checking there and move it > outside CONFIG_CHECKPOINT_RESTORE instead? > > Restriction to CAP_SYSADMIN for follow_link is undertansble, but why do we > restrict readdir and readlink? We didn't think this functionality might be needed someone but us (criu camp), so that the rule of thumb was CONFIG_CHECKPOINT_RESTORE + CAP_SYSADMIN, until otherwise strictly needed. So I think now we can relax security rules a bit and allow to readdir and such for owners. Cyrill