Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2787666ybg; Thu, 24 Oct 2019 15:22:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJcbLJhHmeiPKhG9ozMjCAJoqrsKnlH1227Sa8x7WLQy7kItC7uDOy/1TehAciJ3mm1GSS X-Received: by 2002:a50:aadc:: with SMTP id r28mr509716edc.107.1571955761182; Thu, 24 Oct 2019 15:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571955761; cv=none; d=google.com; s=arc-20160816; b=Ob+o9UnCyP1PAHQUQBxHzg2qGAFsfSK9QwOsp/tTblL4Bt5Y0HFwx3gHud/T0yLde0 iwFVQr6nLmVMuCsgKxWm0pcv4XWJuJc+OZ0wyipTjAqj/G0moZNaH6Z/YzV0+Uk//N0N VQ18ai+IxGZYCjFRciL1DHgVtJUeFo3YG+2LzQRi2VYDFd4kQ8FcXoJQeQZ9S9AwFHGy L8qU0XB9XM91Q1b8mREh05XPxMLbbLeF7C0Vhr8itkbfy2ZGMKgbjJnTwFtNcQ4Vy1mX LdDZhlgD+CFlY0hy4T9pV4+UWny5x4TVilcIxilGyyHyKiJqlFfTqOE5o6YUA5ivgllt Mtqg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=vgkPHxlsqwt32nAEqkydDPGF2ocIN92/rk6bDkqatTg=; b=CjeU7gQV7X+GuvQsqpEuXXbCshanE5RFFToIONjpBelHLy5iKXlPXYafCEq3j/B5L5 x2GcwkNXDh7iUqF1q/BiI/uxu0vkyJPrhRLXTdjzDu5ZR837oRiHeOb7/6Em2Aj5+mRn dmHrZLp4JFK/pewEWr9wERH00KacksEj5TufcodtXNURrfz5epShxGpm2jpVvOps68YL hnt/FaVPgrbLVq6q3+qS8TfVH60lDGhRhxg6/1V0bACA9wRd0PBrtKD5nWuXTbTmHtl4 nnaAfezxlF8GvAK/Z331FnERWhlMC5+Mt33b6QYjzqYVylSieHWvukoXNXDYXZ5XS8Fu V5QA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13si19234656ede.219.2019.10.24.15.22.17; Thu, 24 Oct 2019 15:22:41 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437875AbfJXHmJ (ORCPT + 99 others); Thu, 24 Oct 2019 03:42:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:33308 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2408661AbfJXHmJ (ORCPT ); Thu, 24 Oct 2019 03:42:09 -0400 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 Content-Transfer-Encoding: 8bit In-Reply-To: <4D23D83F-190F-40B3-9EB9-C167642321B2@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 24-10-19 01:33:01, Qian Cai wrote: > > > > On Oct 23, 2019, at 6:30 PM, Andrew Morton wrote: > > > > Yes, removing things is hard. One approach is to add printk_once(this > > is going away, please email us if you use it) then wait a few years. > > Backport that one-liner into -stable kernels to hopefully speed up the > > process. > > Although it still look like an overkill to me given, > > 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. > it is still better than wasting developers’ time to beating the “dead” horse. > > > > > Meanwhile, we need to fix the DoS opportunity. How about my suggestion > > that we limit the count to 1024, see if anyone notices? I bet they > > don't! > > 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. -- Michal Hocko SUSE Labs