Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp956356ybh; Wed, 15 Jul 2020 21:57:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPfUjQz9UYdFqyg42JE53DOWhGs9Z0sqbmX9T6LtAND19lHYLSSnkHeKLJBoxP36RWxCnk X-Received: by 2002:a17:906:48d3:: with SMTP id d19mr2070259ejt.180.1594875455706; Wed, 15 Jul 2020 21:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594875455; cv=none; d=google.com; s=arc-20160816; b=fv9V9HjDseSEMJBy8GCwRMWHyAw8dx5uUpQjta0wiQ3k9OUcb15oixFnbpzHBnYSAF VRH9gNt+EcgusGHV2Ow4a0MX666H8PCdFrbGvWGvezOdhwa65M6HNGhEQomCYc/0S6tQ FPeDqSdLRGWwHeGXbRsLcWUtG9T2Y1w/zUlE0W6LyOkFqio2qmwfKTmL+Zul/zg/h2+b s3avTrjvXeGaLAVL7IkbfSp0+Ikp/UYQS7ZXkgrKYxv03tHuUv8J0i2iG+HaSwUYEwnj JqKgpiI/S8D3VFKy9o7JG9mkuFle6gzjW26DbK1NWTNkCvpYlkDVRR+m5zzbqXIvPCvD 3Qow== 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=W413Gzs+Vp7jq43ZrTtVEJSvZH3H4cRLmNIs2+wsE38=; b=DQUp2ww+szUyirkqJIX1Zk1wGwKDZP99DGQ2oF0XEvm5amNY35JFZx/Po3UqlPmw73 JskvA+sD/tW3WG4BMdCAa+6O7VCdB1apIQMEatWoyrBkqJIpW+7M+l/vhmRtZfHYCqjC AymgvE6jLpHbN80j2AqoITnv56PO5cFFDQf7g50X6C4Mg3Vd8+QLTl1eBGGxwlQBDMMP 3HJFJuJPF7nWGhTz9cZkSh9UNxO9Sgl/2dkfwsGH068SH/C532UEiu76sTvDQNxI1wlG CuqfxexFjTJ4QMgiAkxwkI/rW70FhMR3yN8dYMa25bpCAXoYBEQ3NWzAl2gzco4U3KhS LR0A== 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 h12si2499941ejf.12.2020.07.15.21.57.13; Wed, 15 Jul 2020 21:57:35 -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 S1726090AbgGPEyb (ORCPT + 99 others); Thu, 16 Jul 2020 00:54:31 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:11440 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbgGPEyb (ORCPT ); Thu, 16 Jul 2020 00:54:31 -0400 From: Peter Enderborg To: Greg Kroah-Hartman , , "Rafael J . Wysocki" , Andrew Morton , Jonathan Corbet , , Randy Dunlap , Steven Rostedt , Ingo Molnar Subject: [PATCH v7 0/2] debugfs: Add access restriction option Date: Thu, 16 Jul 2020 06:54:23 +0200 Message-ID: <20200716045425.8729-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). v6 Using ALLOW instead of ACCESS as name on BIT's. Change the fs to mount to make it clear and easy to understand. v7 Updated Kconfig.debug with Randy Dunlap corrections.