[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231017184844.2350750-4-avadhut.naik@amd.com>
Date: Tue, 17 Oct 2023 13:48:43 -0500
From: Avadhut Naik <avadhut.naik@....com>
To: <rafael@...nel.org>, <lenb@...nel.org>,
<linux-acpi@...r.kernel.org>
CC: <yazen.ghannam@....com>, <alexey.kardashevskiy@....com>,
<gregkh@...uxfoundation.org>, <linux-fsdevel@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <avadnaik@....com>
Subject: [PATCH v5 3/4] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo
From: Avadhut Naik <Avadhut.Naik@....com>
The debugfs_create_blob() function has been used to create read-only binary
blobs in debugfs. The function filters out permissions, other than S_IRUSR,
S_IRGRP and S_IROTH, provided while creating the blobs.
The very behavior though is being changed through previous patch in the
series (fs: debugfs: Add write functionality to debugfs blobs) which makes
the binary blobs writable.
As such, rectify the permissions of panicinfo file to ensure it remains
read-only.
Signed-off-by: Avadhut Naik <Avadhut.Naik@....com>
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/platform/chrome/cros_ec_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
index c876120e0ebc..4428dcbd2a68 100644
--- a/drivers/platform/chrome/cros_ec_debugfs.c
+++ b/drivers/platform/chrome/cros_ec_debugfs.c
@@ -454,7 +454,7 @@ static int cros_ec_create_panicinfo(struct cros_ec_debugfs *debug_info)
debug_info->panicinfo_blob.data = data;
debug_info->panicinfo_blob.size = ret;
- debugfs_create_blob("panicinfo", S_IFREG | 0444, debug_info->dir,
+ debugfs_create_blob("panicinfo", 0444, debug_info->dir,
&debug_info->panicinfo_blob);
return 0;
--
2.34.1
Powered by blists - more mailing lists