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=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 E9711C47E49 for ; Thu, 24 Oct 2019 07:42:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ABE6D2166E for ; Thu, 24 Oct 2019 07:42:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABE6D2166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 589616B0007; Thu, 24 Oct 2019 03:42:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 538A36B0008; Thu, 24 Oct 2019 03:42:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 426AF6B000A; Thu, 24 Oct 2019 03:42:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id 25BB16B0007 for ; Thu, 24 Oct 2019 03:42:10 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 9FF17824999B for ; Thu, 24 Oct 2019 07:42:09 +0000 (UTC) X-FDA: 76077884778.16.coach92_873a814ae8a21 X-HE-Tag: coach92_873a814ae8a21 X-Filterd-Recvd-Size: 2979 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Oct 2019 07:42:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2899CB019; Thu, 24 Oct 2019 07:42:07 +0000 (UTC) Date: Thu, 24 Oct 2019 09:42:05 +0200 From: Michal Hocko To: Qian Cai Cc: Andrew Morton , Waiman Long , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Roman Gushchin , Vlastimil Babka , Konstantin Khlebnikov , Jann Horn , Song Liu , Greg Kroah-Hartman , Rafael Aquini Subject: Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo Message-ID: <20191024074205.GQ17610@dhcp22.suse.cz> References: <20191023153040.c7fff4bc7c86ed605fc4667f@linux-foundation.org> <4D23D83F-190F-40B3-9EB9-C167642321B2@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D23D83F-190F-40B3-9EB9-C167642321B2@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Transfer-Encoding: quoted-printable 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 Thu 24-10-19 01:33:01, Qian Cai wrote: >=20 >=20 > > On Oct 23, 2019, at 6:30 PM, Andrew Morton wrote: > >=20 > > Yes, removing things is hard. One approach is to add printk_once(thi= s > > is going away, please email us if you use it) then wait a few years.=20 > > Backport that one-liner into -stable kernels to hopefully speed up th= e > > process. >=20 > Although it still look like an overkill to me given, >=20 > 1) Mel given a green light to remove it. > 2) Nobody justifies any sensible reason to keep it apart from it was > probably only triggering by some testing tools blindly read procfs > entries. It's been useful for debugging memory fragmentation problems and we do not have anything that would provide a similar information. Considering that making it root only is trivial and reducing the lock hold times likewise I do not really see any strong reason to dump it at this moment. =20 > it is still better than wasting developers=E2=80=99 time to beating the= =E2=80=9Cdead=E2=80=9D horse. >=20 > >=20 > > Meanwhile, we need to fix the DoS opportunity. How about my suggesti= on > > that we limit the count to 1024, see if anyone notices? I bet they > > don't! >=20 > The DoS is probably there since the file had been introduced almost 10 > years ago, so I suspect it is not that easily exploitable. Yes you need _tons_ of memory. Reading the file on my 3TB system takes sys 0m3.673s The situation might be worse if the system is terribly fragmented which is not the case here. --=20 Michal Hocko SUSE Labs