Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp299882ybh; Wed, 15 Jul 2020 02:14:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1PR7OBnrHpyWoclsJeqTMGNaabZWJ4dBS90wlpoMqMcUAIxa667gyGXv7d4ielbMW36Fd X-Received: by 2002:a50:9b5d:: with SMTP id a29mr8570794edj.68.1594804463085; Wed, 15 Jul 2020 02:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594804463; cv=none; d=google.com; s=arc-20160816; b=XHHIk0ejLG1HZ4/wU3zo7sMDcO/w/Jz5nyZb4IvhrfF9Z4teuKSpNqSNDb4kMfpHPi bO+EUxC06gSdZoOyGC0H2nW3BJQ6LdRTZaJd8Ocid2UKxr61WPQg4jrQQFAus+pgiSAH KBXiYGSnXkQBLFHH1ueKwT4SwF8hU/RIjnC+PFiuEY9PYrZjaMsr/xMgzKvx61URcCHh yEYZq41Nwy0dkMkGqXUkoW++tsvDMcLAiuYV6hEQOzDiAv+n/XgT27ejCXheMA4oAShN iaf+eX6Nh383p9ihtMqK+Nd99uW3P9e4OxvGgZkXSreXg65pu8GKK0DQXm/BEt+rT+MO 3qeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=cVWWURJ+Rn+ad5Trjuhmrzf4SqO5+j0tcWvZo+ecK1c=; b=hC1gbR6EAZzmsSlqUIy5iGwA/CKNw2MoEPdH9RXzk+RCsJNcdhHO1Z8yRb3vOc3Til XBm9YuR+1VrE6LwuEEL5sJvC35lLj1mv4yt57YEGW+k5vCjdXzwBP7YYPaaxL0M70585 EjlAEFLdEvePALbnGLWWFTnCiXp0fbuP6D5YuNnu0JiZXOjVLYPOLgcsszyhwoR+vSnl ijKud/+jNYm3CA88B/LaDx/WG0CpUNWJowJDnJTQZbhQgNB4XpWslg/sL3x9tbFyxq0N W8Pfk8BVQRBpVMaC2z5vJzCUu157NoZzSHpuw9gQO//EZk090kQ+4ycgLm8rBQncWhie phaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sony.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si850061ejx.94.2020.07.15.02.14.00; Wed, 15 Jul 2020 02:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sony.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730347AbgGOImY (ORCPT + 99 others); Wed, 15 Jul 2020 04:42:24 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:5406 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729227AbgGOImX (ORCPT ); Wed, 15 Jul 2020 04:42:23 -0400 From: Peter Enderborg To: Greg Kroah-Hartman , , "Rafael J . Wysocki" , Andrew Morton , Jonathan Corbet , , Randy Dunlap , Steven Rostedt , Ingo Molnar Subject: [PATCH v5 0/2] debugfs: Add access restriction option Date: Wed, 15 Jul 2020 10:42:05 +0200 Message-ID: <20200715084207.7639-1-peter.enderborg@sony.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200617133738.6631-1-peter.enderborg@sony.com> References: <20200617133738.6631-1-peter.enderborg@sony.com> MIME-Version: 1.0 Content-Type: text/plain X-SEG-SpamProfiler-Analysis: v=2.3 cv=CszBjUwD c=1 sm=1 tr=0 a=Jtaq2Av1iV2Yg7i8w6AGMw==:117 a=_RQrkK6FrEwA:10 a=QyXUC8HyAAAA:8 a=rwTvC7ucDngX97v92ZIA:9 X-SEG-SpamProfiler-Score: 0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since debugfs include sensitive information it need to be treated carefully. But it also has many very useful debug functions for userspace. With this option we can have same configuration for system with need of debugfs and a way to turn it off. This gives a extra protection for exposure on systems where user-space services with system access are attacked. v2. Removed MOUNT as part of restrictions. Added API's restrictions as separate restriction. v3 Updated Documentation after Randy Dunlap reviews and suggestions. v4 Removed #ifdefs from inode.c and using internal.h for configuration and now using BIT() for that. Function is now always on, and are instead selected by a built in default or command line parameter. Changed return value on debug_mount Reported-by: kernel test robot Im not sure about that it is right v5 Added notes to config help suggested by GregKH. Removed _BIT from names, white-space and tab. (checkpatch did not complain).