From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id EEC238E0002 for ; Wed, 16 Jan 2019 20:49:33 -0500 (EST) Received: by mail-wr1-f69.google.com with SMTP id v16so3940022wru.8 for ; Wed, 16 Jan 2019 17:49:33 -0800 (PST) Received: from nautica.notk.org (ipv6.notk.org. [2001:41d0:1:7a93::1]) by mx.google.com with ESMTPS id r1si24500514wmr.17.2019.01.16.17.49.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 17:49:32 -0800 (PST) Date: Thu, 17 Jan 2019 02:49:16 +0100 From: Dominique Martinet Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged Message-ID: <20190117014916.GA10968@nautica> References: <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> <20190116054613.GA11670@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Jiri Kosina Cc: Linus Torvalds , Andy Lutomirski , Josh Snyder , Dave Chinner , Matthew Wilcox , Jann Horn , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Jiri Kosina wrote on Wed, Jan 16, 2019: > So if noone sees any principal problem there, I'll happily submit it with > proper attribution etc. I'm not convinced just the write permission check is enough for mincore(), as Josh also seems to share the concern I raised (e.g. map a git directory "hot" pages) We probably need to add an inode_owner_or_capable() or similar, the open question is do we still need the write access check after that - I don't really know how expensive these calls are. Thanks, -- Dominique