Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp533918ybh; Wed, 15 Jul 2020 08:27:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdKyf98miYxeAHeh5/6axL0ZBoh0j3lxxD42ekBQkqIluqQFuxIg5FlDJQLAZU5waB/GHY X-Received: by 2002:a17:906:3b44:: with SMTP id h4mr10562317ejf.89.1594826831159; Wed, 15 Jul 2020 08:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594826831; cv=none; d=google.com; s=arc-20160816; b=HtY0qS0hzezydivKMhAfjgVA+4RUIXtoAtIZYV7SXYDfe/a6yNx6YRnbnU6Mv1V3iz hTiPOdn2W79Ob4wqr4JvkFyDEdRZRzl9/QKSyfinQAHQMcaERneaeVuiu1H9iJrn3b6L qFKBchD/lBbLBQ3SpHLv/SLyUG28mrrzC8+veVZ4FjYkeHl8LbcAK5FJS9IjK2lplpSG gTUDfvWC9o77zztUHHwCVX5/Wqi+Wj/hHMSuKakuuJfmmjHtQK9SbkEjmalBDV2QcYaV H1y7Gmbcahn4Iswz2gI5oT0EfuIq6s/g0K05sQubnbfm0XS/k4287WUEg/UFqqwg17WM yojg== 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=XdUbVzLTsqiomwrcZ6MjOIJoRDf0DGENVNOpILjFhlw=; b=YnHck3I1zAFi3ZS121+c52imjULQ89iPyO0k9RMZh6yfIUSVJuMOE6KIUJNekGYIeD /tqLQK0OIIJfR5xrf934jXnqZCFFfflqmWsygOUgsXwsEX4FkbGvEXGY8fJlc3g0N/7G h6/MOVp985KabX2si7QsTE3OqrnAwk0Qcj5bwI9XXUV6CPwCi3WBWYHmkRbaSoc3PVG/ eHJ/SGzz7h7dGJrHdBUqOa1oh0Z+mtRqAg2uhjLNhk9sbU/H6zTfmRO9jqND/1tIFSQC yLgmja21huq0xPpBehuZoVkEJs/RDuvVj/KycEVLUYk0Jg1uO3ESiyHiR6DF5jYRBEE9 bNLQ== 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 e5si1420262ejb.453.2020.07.15.08.26.48; Wed, 15 Jul 2020 08:27:11 -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 S1726715AbgGOPZh (ORCPT + 99 others); Wed, 15 Jul 2020 11:25:37 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:15017 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbgGOPZh (ORCPT ); Wed, 15 Jul 2020 11:25:37 -0400 From: Peter Enderborg To: Greg Kroah-Hartman , , "Rafael J . Wysocki" , Andrew Morton , Jonathan Corbet , , Randy Dunlap , Steven Rostedt , Ingo Molnar Subject: [PATCH v6 0/2] debugfs: Add access restriction option Date: Wed, 15 Jul 2020 17:25:27 +0200 Message-ID: <20200715152529.11223-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=kIrCkORFHx6JeP9rmF/Kww==: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.