Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2719860imu; Thu, 17 Jan 2019 20:58:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN49oIUdxMIMayJm1vfiGA8IJUM0N/Jh0j6sKc2WEwhP/K78Z1WbBd68cpSK9QlOPYYZi+VO X-Received: by 2002:a63:5b1f:: with SMTP id p31mr16091419pgb.56.1547787505879; Thu, 17 Jan 2019 20:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547787505; cv=none; d=google.com; s=arc-20160816; b=RmFcfwzMBOKcnuWtvNS9yUbrZVDeBSSogzrO0DWdVfJArCIY8DVjpDngDBJ6B+7CG/ q0cSZ5DIG+BHfufYNW1g0DAz/FKUQGtJrMfy87jz7MiYGWV5fevokOLkcyHmQKpgz0BK C4w4fjUbwLVGCluo2YHlut/cHAyCAaeC+n4hA2n2/JiKSCh6LplFoMfJVTvP5SZ6j2KK OUEI1fCHPz3ZPzxrN6LKKxy3f+cdIHXCXTDmVMg3tFfy/sjqM74e6/Scl+Bv0Si72etK tI2dw+uI6ysYhqb3Sc3Er+JtOYoqGEyOhhEJVOQvfzwSQHUleP9ASibltPrQdi5Qgnl9 ZSvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XLyFz/NJZgEoOZrZ2eJV4Pp3mn+Ctdtd9w409+4P7/w=; b=FwekRqT2lOf81gwF2yNMgDq2NYNuDdZQjpC9qIKZRIgAXDNYrFNvKiMNTjk3l7ZG+y Nf5S5VGqi7QBu82OOeoJtxtCOntheS3FR2383Q0bd/8vQl612DOJw1JNSSzjh6pSljNh VdXQxPwIZHqkHqkkxY0DDCj3qMQPCxH6bFhk66Aw2WvAGq5l8EkSnQVWNh/te+wJvLSE sjlHVggadDoTk9I41KQtC0wQGuOW3sbWdHshh9dhz8NwMMKdQYjeSEDJqO4lyS5as+Ew Vi1D3BNWVieRPbaXf3uVeWfO6f5xRncQr3LR7uIs/tyrd+E/d+XWbM3OXYhQvygFQ5cc Q8qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=TAG5o0xZ; 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 v2si3666381pgn.451.2019.01.17.20.58.07; Thu, 17 Jan 2019 20:58:25 -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=pass header.i=@linux-foundation.org header.s=google header.b=TAG5o0xZ; 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 S1727106AbfAREzR (ORCPT + 99 others); Thu, 17 Jan 2019 23:55:17 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:33573 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727079AbfAREzR (ORCPT ); Thu, 17 Jan 2019 23:55:17 -0500 Received: by mail-lf1-f68.google.com with SMTP id i26so9572286lfc.0 for ; Thu, 17 Jan 2019 20:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XLyFz/NJZgEoOZrZ2eJV4Pp3mn+Ctdtd9w409+4P7/w=; b=TAG5o0xZtljWmnIHysbz45KQ7BDCtWjH7oSSuTR+4rp7IloXFuWN64OzjwO9g3M932 sV0vlIJjAPfriDu66S9TRVu7irEbS5njMc5vCW3OHJdctjaAIqba392tFmtTx78fLJ86 qgUbCJUPuKNG5XdI5ww/WGlqXQZ2cfDACqWcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XLyFz/NJZgEoOZrZ2eJV4Pp3mn+Ctdtd9w409+4P7/w=; b=mujuNXbA9WtA62ox/y2/rSGkZ1hNt98HC9Mmaf1zJosj8F0wQsJSx1EUPc7RG4U4/n uZ2Tb2K4uJEiNJ7hHfWOBz/jnf/ZazaYvu7e733LRvV0nJ9NQz5CASQUdVmWBAwda6kl R6Wg/P8vk6gqM2Nxk0OhxXa9OGXWI1E9kqTbUuvNgv1lLAMCa3BCmr6EwGfVPZ5fbeC1 fdiqHZKgTdkz7X7RJ7XGWmGY/fzetSUGkgQ+2sTFKiEjZTSWd0Btvlcy0Q+y+YfJCH06 1i/CsqHDfQIpHmshod6CAa9/UAPgjTnqcInkkMXA0j1rwvk9KZ4K+CW81ojWr2AkZ7uX PDDA== X-Gm-Message-State: AJcUukcUVgUHhNIVw16hsN3VFNFVJsWRCbEbHyPV4D39G379AKZMTWqJ HNHtgbQ04bGgbFS7PYg8FkDgyGLTYoE= X-Received: by 2002:a19:789:: with SMTP id 131mr12368847lfh.11.1547787314853; Thu, 17 Jan 2019 20:55:14 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id p23sm608564lfh.47.2019.01.17.20.55.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 20:55:13 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id a16so9535062lfg.3 for ; Thu, 17 Jan 2019 20:55:12 -0800 (PST) X-Received: by 2002:a19:982:: with SMTP id 124mr11265403lfj.138.1547787311695; Thu, 17 Jan 2019 20:55:11 -0800 (PST) MIME-Version: 1.0 References: <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> <20190116054613.GA11670@nautica> <20190116213708.GN6310@bombadil.infradead.org> In-Reply-To: From: Linus Torvalds Date: Fri, 18 Jan 2019 16:54:54 +1200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged To: Matthew Wilcox Cc: Jiri Kosina , Dominique Martinet , Andy Lutomirski , Josh Snyder , Dave Chinner , Jann Horn , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 4:51 PM Linus Torvalds wrote: > > On Thu, Jan 17, 2019 at 9:37 AM Matthew Wilcox wrote: > > > > 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? > > That's the _hope_. > > That's the simplest patch I can come up with as a potential solution. > But it's possible that there's some nasty performance regression > because somebody really relies on not even triggering read-ahead, and > we might need to do some totally different thing. Oh, and somebody should probably check that there isn't some simple way to just avoid that readahead code entirely. In particular, right now we skip readahead for at least these cases: /* no read-ahead */ if (!ra->ra_pages) return; if (blk_cgroup_congested()) return; and I don't think we need to worry about the cgroup congestion case - if the attack has to also congest its cgroup with IO, I think they have bigger problems. And I think 'ra_pages' can be zero only in the presence of IO errors, but I might be wrong. It would be good if somebody double-checks that. Linus