Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18864087ybl; Fri, 3 Jan 2020 10:30:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwVxIobKAzvtewenjGvTX3rpGWl2FNrjSbp0IljaA1Jz/qeSRiT5+ucVx3W4pvGjZpf86xA X-Received: by 2002:a9d:5c1:: with SMTP id 59mr101434850otd.192.1578076217788; Fri, 03 Jan 2020 10:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578076217; cv=none; d=google.com; s=arc-20160816; b=ESLswnkv/X9PUKeh7bBYVEKAH20wGcwP2Edrw0fKAi/9xjZ+V0FV58J5yfdNQa0trq w/ahqK6sRK/nvHs83h6JLtnKZ1y4Xzy3PK5TVYqAwHe+RFvbz59C0I9jkjkjvPkkNZDH dWL0BOH6ttsrDmzhg9laxm8HY+Uca+sT7lVb2NhhwOKR6LMm8lmIKcJnGBdqUieWN3VX nMucGnfirpRSqA7n4unO8Y9M4QM3vyVRkz5UTffAB7ZTUWf5l+1qOrW5aVuAKEzfwCU4 oXIqQsdkekQEOckp9jtywlpREk2nquztzuJkR6Ri77i/EDmUI6vQvxDpVejhurW0gG7z RurA== 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=5W+pPuS9TtU37zR7+5Jj1+3+UEJFMh6bRQncF7fgt/Y=; b=GCPiTNMeYOfDJ8uM/65mik8eZKlMAWhDuGEHZddXZLw6FONJUojnKQjJHlzMz9LDdt SD9q6ph3yinn217DsUEoDj7UqVj72AqsK8+MCYLYQ6PyfPYvSJIFxPHdPeaOdUCYrbNl 1avG3UZ0divLP5zgA1dly0Y8T/xSljrsKj4u+XrUnFFmCCVi0ECsa9bEc8ABIFQD66Ca YGfx74s0l4HB7qnUQ5fTu8BVwwe2D8l7etPyIBibsCXgfI+wwrJmobZ48RalbVh3erSa YLiNZfH/LXwKZbtdUU/PTuwyQ+FyOr/SvCvxQW71iY7RsQ08bWggEuCAgSjbNsy0DMF7 0vOw== 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 d5si1960154oti.61.2020.01.03.10.30.06; Fri, 03 Jan 2020 10:30:17 -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 S1728460AbgACS3Q (ORCPT + 99 others); Fri, 3 Jan 2020 13:29:16 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:39346 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728251AbgACS3P (ORCPT ); Fri, 3 Jan 2020 13:29:15 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 205D51C210C; Fri, 3 Jan 2020 19:29:13 +0100 (CET) Date: Fri, 3 Jan 2020 19:29:11 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Johannes Weiner , Chris Down , Vlastimil Babka , David Hildenbrand , Michal Hocko , Alexey Dobriyan , Andrew Morton , Linus Torvalds , Sasha Levin Subject: Re: [PATCH 4.19 071/114] kernel: sysctl: make drop_caches write-only Message-ID: <20200103182911.GE14328@amd> References: <20200102220029.183913184@linuxfoundation.org> <20200102220036.228967185@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hwvH6HDNit2nSK4j" Content-Disposition: inline In-Reply-To: <20200102220036.228967185@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hwvH6HDNit2nSK4j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Johannes Weiner >=20 > [ Upstream commit 204cb79ad42f015312a5bbd7012d09c93d9b46fb ] >=20 > Currently, the drop_caches proc file and sysctl read back the last value > written, suggesting this is somehow a stateful setting instead of a > one-time command. Make it write-only, like e.g. compact_memory. I have no problem with that, but is it good idea for stable? Plus, I seem to recall that drop_caches was somehow dangerous, debugging-only stuff, one should not use on production system. Did that get fixed in the meantime? Best regards, Pavel =09 > @@ -1411,7 +1411,7 @@ static struct ctl_table vm_table[] =3D { > .procname =3D "drop_caches", > .data =3D &sysctl_drop_caches, > .maxlen =3D sizeof(int), > - .mode =3D 0644, > + .mode =3D 0200, > .proc_handler =3D drop_caches_sysctl_handler, > .extra1 =3D &one, > .extra2 =3D &four, --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --hwvH6HDNit2nSK4j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl4Ph/cACgkQMOfwapXb+vKyewCfYGsGaL15ikZRERDm/pxgfBWU vTQAn3NSUiTWplLsT2H6o0QHeo59SVpW =vtP8 -----END PGP SIGNATURE----- --hwvH6HDNit2nSK4j--