From: Avadhut Naik <avadnaik@amd.com>
To: "Luck, Tony" <tony.luck@intel.com>,
Avadhut Naik <avadhut.naik@amd.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Cc: "rafael@kernel.org" <rafael@kernel.org>,
"lenb@kernel.org" <lenb@kernel.org>,
"james.morse@arm.com" <james.morse@arm.com>,
"bp@alien8.de" <bp@alien8.de>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"alexey.kardashevskiy@amd.com" <alexey.kardashevskiy@amd.com>,
"yazen.ghannam@amd.com" <yazen.ghannam@amd.com>
Subject: Re: [RESEND v5 3/4] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo
Date: Wed, 8 Nov 2023 12:11:02 -0600 [thread overview]
Message-ID: <02d731da-5012-43ca-9b79-cbb7b5a55e8d@amd.com> (raw)
In-Reply-To: <SJ1PR11MB60835765F536429966023B01FCA9A@SJ1PR11MB6083.namprd11.prod.outlook.com>
Hi,
On 11/7/2023 16:35, Luck, Tony wrote:
>> @@ -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);
>>
>
> This just looks like a bug that S_IFREG was passed in the "mode" argument.
>
> Your change in part 2 doesn't really affect much here.
>
> debugfs_create_blob()
> debugfs_create_file_unsafe()
> __debugfs_create_file()
>
> which does:
>
> if (!(mode & S_IFMT))
> mode |= S_IFREG;
> BUG_ON(!S_ISREG(mode));
>
> So this is a fine cleanup. But your patch description about ensuring that
> the file remains read-only isn't accurate. Your change didn't affect the mode
> of this file.
>
Noted. Thanks for the explanation. Will change the patch description accordingly.
> -Tony
>
>
--
Thanks,
Avadhut Naik
next prev parent reply other threads:[~2023-11-08 18:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 21:36 [RESEND v5 0/4] Add support for Vendor Defined Error Types in Einj Module Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 1/4] ACPI: APEI: EINJ: Refactor available_error_type_show() Avadhut Naik
2023-11-08 20:19 ` Borislav Petkov
2023-11-16 21:46 ` Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 2/4] fs: debugfs: Add write functionality to debugfs blobs Avadhut Naik
2023-11-07 22:28 ` Luck, Tony
2023-11-08 18:09 ` Avadhut Naik
2023-11-16 17:54 ` Avadhut Naik
2023-11-16 18:44 ` Luck, Tony
2023-11-16 21:46 ` Avadhut Naik
2023-11-07 21:36 ` [RESEND v5 3/4] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo Avadhut Naik
2023-11-07 22:35 ` Luck, Tony
2023-11-08 18:11 ` Avadhut Naik [this message]
2023-11-07 21:36 ` [RESEND v5 4/4] ACPI: APEI: EINJ: Add support for vendor defined error types Avadhut Naik
2023-11-07 22:41 ` Luck, Tony
2023-11-15 12:33 ` Borislav Petkov
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=02d731da-5012-43ca-9b79-cbb7b5a55e8d@amd.com \
--to=avadnaik@amd.com \
--cc=alexey.kardashevskiy@amd.com \
--cc=avadhut.naik@amd.com \
--cc=bp@alien8.de \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
--cc=yazen.ghannam@amd.com \
/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