Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1360922imu; Wed, 16 Jan 2019 18:08:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN4ZfxAXYZF7iCvq3VxJkZtg5DEKNhOJPyHR/eiWcwfaOLW0wqJezsh779lmykIv8XneUe/l X-Received: by 2002:a62:59c9:: with SMTP id k70mr12933548pfj.243.1547690886393; Wed, 16 Jan 2019 18:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547690886; cv=none; d=google.com; s=arc-20160816; b=zLreOseH7vjRv8K/qYhx1aoDWOhR5fTgrZgCwDBGSW1BPKYFwPwSsaW0A5Sjin/tHE R/25ZqzK6EhkwVSIkiOhXk8qBYFfQFGftVdK5ngiSnOV3lxgGWm+O+USY+Tj2r/PrOcB /3L2nl0CD2EfWSrM2ZN0nRJV1z8ymNMiFAOdnlkO2+BmGuy7darIC9T53Es5a9EnWaNH miIRugKUJPza+DTMeWzjATwysmBoKH4D14XoReoWgNjMsgfpBYxWJO2DPnrUj4lxjDKi 5KzKCDbYwB6T9U9WN6nEH5OGOBCrBE+TbP+WEewrU6V3RxyVG/Qh57DNbqP3oEObFide 9b6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IOxS3BbKrFS3rsUwl+XdHPHB6a66ULhlgjVXEkcTyCg=; b=zFq2kwDFVcADUP9DsA3EiG75GSHL14wY5HUdyx6K65K+bPODMVHoRpXNaYvdD1pCMj vIBuDuSE9BgAyrqMFjEzz38yW8FR8cg2y6zOxdPqgOikVCu0Sjvtha/2Wb1u/3zujEZG 7bXwIwO7Sb+9PDHr8w3Wk5UowJy7TQrPD9TvfbijQvj8ZpQ1Ic5Wvay85xwhy0q8PASv A5Ep3HpYHfx8c/ZyfZa8r0pOy+TFYd4O3Rr0qQa7/SpROGH/q4/XF8NKdzJNwzvp/j3a ed9bvfkXwl8x+tLwtEgkN0ovQIlsHlOGru2mGkdpsXigFuqSqc2Udb90X4T7RYQgPeIJ LsnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13si162468pgj.157.2019.01.16.18.07.48; Wed, 16 Jan 2019 18:08:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727876AbfAQBte (ORCPT + 99 others); Wed, 16 Jan 2019 20:49:34 -0500 Received: from nautica.notk.org ([91.121.71.147]:48628 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfAQBtd (ORCPT ); Wed, 16 Jan 2019 20:49:33 -0500 Received: by nautica.notk.org (Postfix, from userid 1001) id 8A919C009; Thu, 17 Jan 2019 02:49:31 +0100 (CET) Date: Thu, 17 Jan 2019 02:49:16 +0100 From: Dominique Martinet 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 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: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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