mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oded Gabbay <ogabbay@kernel.org>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Avri Kehat <akehat@habana.ai>
Subject: [PATCH 06/13] accel/habanalabs: fix debugfs files permissions
Date: Tue, 20 Feb 2024 18:01:22 +0200	[thread overview]
Message-ID: <20240220160129.909714-6-ogabbay@kernel.org> (raw)
In-Reply-To: <20240220160129.909714-1-ogabbay@kernel.org>

From: Avri Kehat <akehat@habana.ai>

debugfs files are created with permissions that don't align
with the access requirements.

Signed-off-by: Avri Kehat <akehat@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/accel/habanalabs/common/debugfs.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/accel/habanalabs/common/debugfs.c b/drivers/accel/habanalabs/common/debugfs.c
index 01f071d52570..ab0fe74b49d0 100644
--- a/drivers/accel/habanalabs/common/debugfs.c
+++ b/drivers/accel/habanalabs/common/debugfs.c
@@ -1643,19 +1643,19 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
 				&hl_data64b_fops);
 
 	debugfs_create_file("set_power_state",
-				0200,
+				0644,
 				root,
 				dev_entry,
 				&hl_power_fops);
 
 	debugfs_create_file("device",
-				0200,
+				0644,
 				root,
 				dev_entry,
 				&hl_device_fops);
 
 	debugfs_create_file("clk_gate",
-				0200,
+				0644,
 				root,
 				dev_entry,
 				&hl_clk_gate_fops);
@@ -1667,13 +1667,13 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
 				&hl_stop_on_err_fops);
 
 	debugfs_create_file("dump_security_violations",
-				0644,
+				0400,
 				root,
 				dev_entry,
 				&hl_security_violations_fops);
 
 	debugfs_create_file("dump_razwi_events",
-				0644,
+				0400,
 				root,
 				dev_entry,
 				&hl_razwi_check_fops);
@@ -1706,7 +1706,7 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
 				&hdev->reset_info.skip_reset_on_timeout);
 
 	debugfs_create_file("state_dump",
-				0600,
+				0644,
 				root,
 				dev_entry,
 				&hl_state_dump_fops);
@@ -1724,7 +1724,7 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
 
 	for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) {
 		debugfs_create_file(hl_debugfs_list[i].name,
-					0444,
+					0644,
 					root,
 					entry,
 					&hl_debugfs_fops);
-- 
2.34.1


  parent reply	other threads:[~2024-02-20 16:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 16:01 [PATCH 01/13] accel/habanalabs/gaudi2: use single function to compare FW versions Oded Gabbay
2024-02-20 16:01 ` [PATCH 02/13] accel/habanalabs: remove hop size from asic properties Oded Gabbay
2024-02-23 22:42   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 03/13] accel/habanalabs: modify print for skip loading linux FW to debug log Oded Gabbay
2024-02-23 22:45   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 04/13] accel/habanalabs/gaudi2: check extended errors according to PCIe addr_dec interrupt info Oded Gabbay
2024-02-23 22:49   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 05/13] accel/habanalabs: fix glbl error cause handling Oded Gabbay
2024-02-23 23:01   ` Carl Vanderlip
2024-02-20 16:01 ` Oded Gabbay [this message]
2024-02-23 23:10   ` [PATCH 06/13] accel/habanalabs: fix debugfs files permissions Carl Vanderlip
2024-02-20 16:01 ` [PATCH 07/13] accel/habanalabs: initialize maybe-uninitialized variables Oded Gabbay
2024-02-23 23:12   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 08/13] accel/habanalabs: fix error print Oded Gabbay
2024-02-23 23:15   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 09/13] accel/habanalabs/gaudi2: drain event lacks rd/wr indication Oded Gabbay
2024-02-23 23:17   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 10/13] accel/habanalabs/hwmon: rate limit errors user can generate Oded Gabbay
2024-02-23 23:21   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 11/13] accel/habanalabs: handle reserved memory request when working with full FW Oded Gabbay
2024-02-23 23:24   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 12/13] accel/habanalabs: keep explicit size of reserved memory for FW Oded Gabbay
2024-02-23 23:26   ` Carl Vanderlip
2024-02-20 16:01 ` [PATCH 13/13] accel/habanalabs: modify pci health check Oded Gabbay
2024-02-23 23:32   ` Carl Vanderlip
2024-02-24 19:20     ` Ofir Bitton
2024-02-23 22:38 ` [PATCH 01/13] accel/habanalabs/gaudi2: use single function to compare FW versions Carl Vanderlip
2024-02-25 10:36   ` Ohad Sharabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220160129.909714-6-ogabbay@kernel.org \
    --to=ogabbay@kernel.org \
    --cc=akehat@habana.ai \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome