From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by kanga.kvack.org (Postfix) with ESMTP id B27C18E0002 for ; Wed, 16 Jan 2019 07:36:12 -0500 (EST) Received: by mail-pl1-f200.google.com with SMTP id v2so3738532plg.6 for ; Wed, 16 Jan 2019 04:36:12 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [198.137.202.133]) by mx.google.com with ESMTPS id j65si5869131pge.444.2019.01.16.04.36.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 04:36:11 -0800 (PST) Date: Wed, 16 Jan 2019 04:36:07 -0800 From: Matthew Wilcox Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged Message-ID: <20190116123607.GG6310@bombadil.infradead.org> References: <20190109043906.GF27534@dastard> <20190110004424.GH27534@dastard> <20190110070355.GJ27534@dastard> <20190110122442.GA21216@nautica> <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Josh Snyder , Dominique Martinet , Dave Chinner , Jiri Kosina , Jann Horn , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API On Wed, Jan 16, 2019 at 05:00:25PM +1200, Linus Torvalds wrote: > And if you're not the owner of the file, do you have another > suggestion for that "Yes, I have the right to see what's in-core for > this file". Because the problem is literally that if it's some random > read-only system file, the kernel shouldn't leak access patterns to > it.. This probably isn't a good heuristic, but thought I'd mention it anyway ... if the file is executable and you're not the owner, mincore always/never says its pages are resident. That'd fix all library leaks, but then there's probably a smart way of figuring out something from access patterns to a data file of some kind (/etc/passwd?)