From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D42B0CA9ED1 for ; Fri, 1 Nov 2019 19:35:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97D0621897 for ; Fri, 1 Nov 2019 19:35:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kcj21evp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97D0621897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 252436B0005; Fri, 1 Nov 2019 15:35:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 22A066B0006; Fri, 1 Nov 2019 15:35:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 118E16B0007; Fri, 1 Nov 2019 15:35:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id E4D656B0005 for ; Fri, 1 Nov 2019 15:35:46 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 825516D97 for ; Fri, 1 Nov 2019 19:35:46 +0000 (UTC) X-FDA: 76108713492.04.step75_89ad48152fc4d X-HE-Tag: step75_89ad48152fc4d X-Filterd-Recvd-Size: 2660 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Fri, 1 Nov 2019 19:35:45 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDF13217D9; Fri, 1 Nov 2019 19:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572636945; bh=TD/4EVGajF1pvAJu8BvCJSc0WAO+35JeCmCE73abJz8=; h=Date:From:To:Subject:In-Reply-To:References:From; b=kcj21evp7laeZ3PBP7m9bhba8T8SgvmLhPTex6Zfu4JzkEMl33NA3ZSwOg1lEwDMG ALaElUIt9ThCCZ2uo/WBuyEu1Q9/rtZ5gFk1aXIOtvnDpS+F4604rpPq3uvAqcu8rK acruqAA2YvAFT+xcRHPj35GAijhKWCAzwpiUXExg= Date: Fri, 1 Nov 2019 12:35:44 -0700 From: Andrew Morton To: Chris Down , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Alexey Dobriyan Subject: Re: [PATCH] kernel: sysctl: make drop_caches write-only Message-Id: <20191101123544.c9b0024a1e8f5ddf63148b48@linux-foundation.org> In-Reply-To: <20191101122920.798a6d61b2725da8cfe80549@linux-foundation.org> References: <20191031221602.9375-1-hannes@cmpxchg.org> <20191031162825.a545a5d4d8567368501769bd@linux-foundation.org> <20191101110901.GB690103@chrisdown.name> <20191101144540.GA12808@cmpxchg.org> <20191101115950.bb88d49849bfecb1af0a88bf@linux-foundation.org> <20191101192405.GA866154@chrisdown.name> <20191101122920.798a6d61b2725da8cfe80549@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 1 Nov 2019 12:29:20 -0700 Andrew Morton wrote: > > Either change is an upgrade from the current situation, at least. I prefer > > towards whatever makes the API the least confusing, which appears to be > > Johannes' original change, but I'd support a patch which always set it to > > 0 instead if it was deemed safer. > > On the other hand.. As I mentioned earlier, if someone's code is > failing because of the permissions change, they can chmod > /proc/sys/vm/drop_caches at boot time and be happy. They have no such > workaround if their software misbehaves due to a read always returning > "0". I lied. I can chmod things in /proc but I can't chmod things in /proc/sys/vm. Huh, why did we do that?