Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1297386imu; Wed, 16 Jan 2019 16:39:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN5QeWQXyqM4FwB8Fu/h6ewYXYdW3SFvx/Z36RcFbbuvBMgHIvdEFxolGcX9vATuaf8CzSMU X-Received: by 2002:a62:35c7:: with SMTP id c190mr13113452pfa.76.1547685577577; Wed, 16 Jan 2019 16:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547685577; cv=none; d=google.com; s=arc-20160816; b=Mod3LfJHvUcq1vr62vYmp8M9fX1eHG6DIqQaKvVK3c9x2VNkSsIeAEHfHjXp0/FDl1 MeXQUTlu/vN9PR4nQMlOgrH72/y1u721LJp4id6JL2mUqgoxiFiEyJ7nbOrFEhfcTsvO b4+h40ncSelGzqRCZ6KYLKZPGtgaaT38LbOsoKd0TAm7UHGbFgQp5cJ9sd62fWA9u6p3 /HyIwII+Hf7cEO1eHwI7m97VL3hr2VWTXsngU/8nmwlOiComttk385Mgacri070UNXne Zwa+XTOX8321jcKA3Q6Gla9A6YHlIsgP+/4TtTuT6OXeXIKV76scXHSfniZk/UmAelVk gJlA== 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:dkim-signature; bh=WElwlgattYoyktBhy+K/w+lEiDAr/L74bbJ6s/TGJko=; b=Fg1yPTzoJElpGR8s8JXUx253lzjAzRiPthPIlD+ldxjnDrd1ohpGXSWCq+nxLNXNWK HpP/2DcUpkdM/1olQB7r33/sq0UPntkMQwiiNAZrPjekqEpubUETez29O37l0Sv/v/pG Ey1/UC0Zj+EU3BXs5hCUN4i9ofFb6tty4GDTM3jyj9mOiJHtsK2zxkuMdZ60E5sMmEjB wv3cK82kdGWI0ACN6yeqlT7oEniHdBLRXcJHG/UTNo08RGgfu7COBz7AC1MlJTarazYt 4oDew9bQt2ckLOwHepJnKBglEz12A1LpCvHYTWyXddC1i0Aqa7pHREQlVoVqaKSVtAVb HzfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TnhbWGzc; 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 d34si7451947pgb.43.2019.01.16.16.39.22; Wed, 16 Jan 2019 16:39:37 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TnhbWGzc; 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 S1730715AbfAPVhR (ORCPT + 99 others); Wed, 16 Jan 2019 16:37:17 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48178 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729361AbfAPVhQ (ORCPT ); Wed, 16 Jan 2019 16:37:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WElwlgattYoyktBhy+K/w+lEiDAr/L74bbJ6s/TGJko=; b=TnhbWGzcioiTXrxCV9HeTPY8Z 7W10J4Y+hXWi3Oao3lDDNAImCE7cqCuFXNUvbHVgh6LQ6n0oPQPtHtp2+yVW+wz5OpUIE/CP+r83Y tg1qChi5OmqwKmTirtgTHuP6lsj5QTslnKQrQO+vkhCsd4L174ZwwZT7LkqUHRRYh29y6Ic/Nq4Cp kW4fOPikbvzV2lXRhvNaPwgr065HZnoQqSrviEIdeYB2V5V9W1dFHY87hMVYBLxaR4bywBJ86/LJy 7dzR2DeV1SWHm/16aAopJKsVT2u03kvs9umOrGaaY1R+2tKOCVcwRB1YWkp7j3XLM1lZqHs1iBp9m Og/mjCY5Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjss0-0007nl-U2; Wed, 16 Jan 2019 21:37:08 +0000 Date: Wed, 16 Jan 2019 13:37:08 -0800 From: Matthew Wilcox To: Jiri Kosina Cc: Linus Torvalds , Dominique Martinet , Andy Lutomirski , Josh Snyder , Dave Chinner , 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: <20190116213708.GN6310@bombadil.infradead.org> 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 09:23:04PM +0100, Jiri Kosina wrote: > On Thu, 17 Jan 2019, Linus Torvalds wrote: > > As I suggested earlier in the thread, the fix for RWF_NOWAIT might be > > to just move the test down to after readahead. Your patch 3/3 just removes the test. Am I right in thinking that it doesn't need to be *moved* because the existing test after !PageUptodate catches it? Of course, there aren't any tests for RWF_NOWAIT in xfstests. Are there any in LTP? Some typos in the commit messages: > Another aproach (checking file access permissions in order to decide "approach" > Subject: [PATCH 2/3] mm/mincore: make mincore() more conservative > > The semantics of what mincore() considers to be resident is not completely > clearar, but Linux has always (since 2.3.52, which is when mincore() was "clear" > initially done) treated it as "page is available in page cache". > > That's potentially a problem, as that [in]directly exposes meta-information > about pagecache / memory mapping state even about memory not strictly belonging > to the process executing the syscall, opening possibilities for sidechannel > attacks. > > Change the semantics of mincore() so that it only reveals pagecache information > for non-anonymous mappings that belog to files that the calling process could "belong"