Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1613719ybg; Wed, 23 Oct 2019 19:35:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqww1gjQwX1CX6QWxfcUC/5kAnsDMPwiddzHKzVmJmRkMfTn5Rxe5I4g30ePEBOR1txFyQFM X-Received: by 2002:a17:906:6094:: with SMTP id t20mr35963503ejj.316.1571884554988; Wed, 23 Oct 2019 19:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571884554; cv=none; d=google.com; s=arc-20160816; b=Hv5qo/JDjwkGCGIICdVERLscC/66CVOeEdC07eYr2Jv4KF9HXYVz4C3o4PC8uJCvPo vaSnBNOOOhptdr59ZCC0oMIktUnaK10OAD1qggrAsNCZ7wSe68IKcIPU8MrP9kFkHEzs r8iC4Jlaw6/cIyvq0Vy3Ug5yT8JCRs6D4+CKDpwQpiJHMCb5gX0hEGWEF5kJk0vBH2vy wa073C7Ef3lSsHBR4007Ci5CcTNnYSvPLP7qiWjMD+NYXSRz4Tk4Zpfn90XqNdb7le+8 lAp7D4HDAHM5erjWi+8rC1Yd2Kkomn+XPE80VtCfCRmaEX2E+rEWi63W4AdIOVjVT7XQ z92g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tlaewf16ukXOc2N6dF0rd3mLZ8BjJkXYbd4jVtG8Wwg=; b=YhdZI9fMFFfLO2BW86iHgoZuJpioRt5BhG6wu/Aiq+vvMrBACOZs8CEHDnABYi1EXE Lx1TQZ5BcjylWI9fOikyxQNDCPJ82KKVKROPhUPdfhTbVQ4Qav0aMalZNrQFvFnc83xf URb9PKwTALEKOCB1oLcBrUKkGYwHnVc7yfUMrwleGmTn3CsTDYs2YKH7ikhHsl3cEYXS ch9B4z3ughPp8nSl0D/YjWMSs1neOwa/5cxYnTCMNYkmFxWuSS2XkL1AYIGFEXC/dcv1 afG82bLvKVsus9XSpfR5Wb0jObOH1U6praS8qyHrb8sf/b8dvYd4DUTwVJjfnHo42oiA T/tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LbchELzQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd8si4178670ejb.194.2019.10.23.19.35.31; Wed, 23 Oct 2019 19:35:54 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LbchELzQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406538AbfJWPKU (ORCPT + 99 others); Wed, 23 Oct 2019 11:10:20 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:25273 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2406533AbfJWPKU (ORCPT ); Wed, 23 Oct 2019 11:10:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571843419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tlaewf16ukXOc2N6dF0rd3mLZ8BjJkXYbd4jVtG8Wwg=; b=LbchELzQpdSI/qQruRz2IQcO66fu1MXxBjv6wNQDsxmCm1ZlmBY+mPLttE4jx/4V2XXRso d3QA6A8FhK6S4iwM80y53hCmIyjzNaO7vnCl6SQlnH3XPhn3e6DZVqJ5NkO/2SGtlx569F nj8xVAgi/KuE9MnISEO7yaBFlCTqWpA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-9FH-jAAlMq6rZptRE9Q6BQ-1; Wed, 23 Oct 2019 11:10:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CCBD1800D6B; Wed, 23 Oct 2019 15:10:13 +0000 (UTC) Received: from optiplex-lnx (ovpn-112-50.rdu2.redhat.com [10.10.112.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F2265C241; Wed, 23 Oct 2019 15:10:08 +0000 (UTC) Date: Wed, 23 Oct 2019 11:10:05 -0400 From: Rafael Aquini To: Michal Hocko Cc: Andrew Morton , Mel Gorman , Waiman Long , Johannes Weiner , Roman Gushchin , Vlastimil Babka , Konstantin Khlebnikov , Jann Horn , Song Liu , Greg Kroah-Hartman , linux-mm@kvack.org, LKML , Michal Hocko Subject: Re: [RFC PATCH 1/2] mm, vmstat: hide /proc/pagetypeinfo from normal users Message-ID: <20191023151005.GE22601@optiplex-lnx> References: <20191023095607.GE3016@techsingularity.net> <20191023102737.32274-1-mhocko@kernel.org> <20191023102737.32274-2-mhocko@kernel.org> MIME-Version: 1.0 In-Reply-To: <20191023102737.32274-2-mhocko@kernel.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 9FH-jAAlMq6rZptRE9Q6BQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 12:27:36PM +0200, Michal Hocko wrote: > From: Michal Hocko >=20 > /proc/pagetypeinfo is a debugging tool to examine internal page > allocator state wrt to fragmentation. It is not very useful for > any other use so normal users really do not need to read this file. >=20 > Waiman Long has noticed that reading this file can have negative side > effects because zone->lock is necessary for gathering data and that > a) interferes with the page allocator and its users and b) can lead to > hard lockups on large machines which have very long free_list. >=20 > Reduce both issues by simply not exporting the file to regular users. >=20 > Reported-by: Waiman Long > Cc: stable > Signed-off-by: Michal Hocko > --- > mm/vmstat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/mm/vmstat.c b/mm/vmstat.c > index 6afc892a148a..4e885ecd44d1 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -1972,7 +1972,7 @@ void __init init_mm_internals(void) > #endif > #ifdef CONFIG_PROC_FS > =09proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op); > -=09proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op); > +=09proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op); > =09proc_create_seq("vmstat", 0444, NULL, &vmstat_op); > =09proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op); > #endif > --=20 > 2.20.1 > =20 Acked-by: Rafael Aquini