Skip to content

Commit 0b105a2

Browse files
avrikehatogabbay
authored andcommitted
accel/habanalabs: fix debugfs files permissions
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> Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
1 parent e855869 commit 0b105a2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/accel/habanalabs/common/debugfs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,19 +1643,19 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
16431643
&hl_data64b_fops);
16441644

16451645
debugfs_create_file("set_power_state",
1646-
0200,
1646+
0644,
16471647
root,
16481648
dev_entry,
16491649
&hl_power_fops);
16501650

16511651
debugfs_create_file("device",
1652-
0200,
1652+
0644,
16531653
root,
16541654
dev_entry,
16551655
&hl_device_fops);
16561656

16571657
debugfs_create_file("clk_gate",
1658-
0200,
1658+
0644,
16591659
root,
16601660
dev_entry,
16611661
&hl_clk_gate_fops);
@@ -1667,13 +1667,13 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
16671667
&hl_stop_on_err_fops);
16681668

16691669
debugfs_create_file("dump_security_violations",
1670-
0644,
1670+
0400,
16711671
root,
16721672
dev_entry,
16731673
&hl_security_violations_fops);
16741674

16751675
debugfs_create_file("dump_razwi_events",
1676-
0644,
1676+
0400,
16771677
root,
16781678
dev_entry,
16791679
&hl_razwi_check_fops);
@@ -1706,7 +1706,7 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
17061706
&hdev->reset_info.skip_reset_on_timeout);
17071707

17081708
debugfs_create_file("state_dump",
1709-
0600,
1709+
0644,
17101710
root,
17111711
dev_entry,
17121712
&hl_state_dump_fops);
@@ -1724,7 +1724,7 @@ static void add_files_to_device(struct hl_device *hdev, struct hl_dbg_device_ent
17241724

17251725
for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) {
17261726
debugfs_create_file(hl_debugfs_list[i].name,
1727-
0444,
1727+
0644,
17281728
root,
17291729
entry,
17301730
&hl_debugfs_fops);

0 commit comments

Comments
 (0)