Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A9D6C27C76 for ; Wed, 25 Jan 2023 23:37:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbjAYXhw (ORCPT ); Wed, 25 Jan 2023 18:37:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236147AbjAYXh0 (ORCPT ); Wed, 25 Jan 2023 18:37:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E035B5E518; Wed, 25 Jan 2023 15:36:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2B367616DD; Wed, 25 Jan 2023 23:36:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53138C433D2; Wed, 25 Jan 2023 23:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1674689810; bh=qdW7GJEApmAZ3dv73jbkJCPfiH6FFqfAWFb67eqZLg0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=spPzlcbA9nU2SSJfH0Wm7RoFovVPbqPlr9EUTDq3WpjqP6+Eamp0HEa9LLMqEWf1b z0f6+posc3c5OJtlmxx09xMdn+jHMGKvWj1igwOChNLLhmxU81f+BybI59+3kkUPYJ +XTFDhw1y6rXW2fzFJps+BxJ2DHqVeAnSPeDmoKc= Date: Wed, 25 Jan 2023 15:36:49 -0800 From: Andrew Morton To: Alexey Gladkov Cc: LKML , containers@lists.linux.dev, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Al Viro , Christian Brauner , Val Cowan Subject: Re: [RFC PATCH v1 2/6] proc: Add allowlist to control access to procfs files Message-Id: <20230125153649.a8524c34b89d6cdbb06bd5a2@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Jan 2023 16:28:49 +0100 Alexey Gladkov wrote: > +config PROC_ALLOW_LIST > + bool "/proc/allowlist support" > + depends on PROC_FS > + default n > + help > + Provides a way to restrict access to certain files in procfs. Mounting I'd say "to restrict presence of files in procfs". > + procfs with subset=allowlist will add the file /proc/allowlist which > + contains a list of files and directories that should be accessed. To s/accessed/present/ > + prevent the list from being changed, the file itself must be excluded.