Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1016551ybh; Thu, 16 Jul 2020 00:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfKj0zyVpH6XNcPZasKc51xf5Gf0zLB2j3zqaLSAYTyHwm0QLEhaFzCkNuhBbOlZxobxsR X-Received: by 2002:aa7:c3d6:: with SMTP id l22mr3178447edr.148.1594883935604; Thu, 16 Jul 2020 00:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594883935; cv=none; d=google.com; s=arc-20160816; b=eWF6eJPohJRvbSiMFYkrN9/lqcIrb5/3DAlUFz4rn1bMEkYq2a12Qgz7HL5aBEBrxE dUUYIZVHnB/wK8UZO0zLYjCzRMOLTCAEOcp+YwWBWi5ILkWj4PRvEvoOFRyKD8ZKwJi3 bzlyX0SIFzckXQXQZF8+JhWJpJosicXGEdCEntrLLtVqfkILQzOPRp/7wY/MoTpd57Dq TWU9Nh0HuhzutuTSd1M5CQd0aX647ItuJN0/683ck5vM3n5QJ9lH59LFvxIBJma6IPXr uSkzp7gI8HuX8MVEz0B/SyIN+ZwCWKwTtk+qu6iPCWTKHgcbs/s/QU+6q/14sQn2pL9W XoQA== 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=nXQk2URkPMZ+/koyV1jZa1zFftMbBeO+rXRYuAeVFms=; b=jIQWPYvWKXVZT8ymjHocgwWSBFjDXLlK7rxyhLOCEhzv8bJSoGpQdOY8c9B0rLPmO3 CM2eEYu0t6HmDh8aYw+8TaQ80od858/EAROTnChGyD7sNaY3CBU4riTJSPl+UOrHDsnG yinBdrwRF96i0nCnX6DVSbV9S3jKHUN0HIijtPOK/UDFuB3A1wRPbhC4SK35i7qbYiHE Yt+ae6Yc/iyyGpq7Or3yVWpf33LST3Fuu2pH7TODbxVVb2p6Wbt/9Gn625Uak2Vercys i2w0wJXgQZgEumvJY2wXyyR7Hlzx8l5aqpZHSCv94pJeURipqla/aJKp//x2STdXjrPc zIhg== 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 y19si2681196ejb.186.2020.07.16.00.18.33; Thu, 16 Jul 2020 00:18:55 -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 S1728255AbgGPHPS (ORCPT + 99 others); Thu, 16 Jul 2020 03:15:18 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:14494 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726141AbgGPHPS (ORCPT ); Thu, 16 Jul 2020 03:15:18 -0400 From: Peter Enderborg To: Greg Kroah-Hartman , , "Rafael J . Wysocki" , Andrew Morton , Jonathan Corbet , , Randy Dunlap , Steven Rostedt , Ingo Molnar Subject: [PATCH v8 0/2] debugfs: Add access restriction option Date: Thu, 16 Jul 2020 09:15:09 +0200 Message-ID: <20200716071511.26864-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. v8 Spell fixes from Randy and using else-if for command argument parser.