lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Nov 2023 12:11:02 -0600
From:   Avadhut Naik <avadnaik@....com>
To:     "Luck, Tony" <tony.luck@...el.com>,
        Avadhut Naik <avadhut.naik@....com>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Cc:     "rafael@...nel.org" <rafael@...nel.org>,
        "lenb@...nel.org" <lenb@...nel.org>,
        "james.morse@....com" <james.morse@....com>,
        "bp@...en8.de" <bp@...en8.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "alexey.kardashevskiy@....com" <alexey.kardashevskiy@....com>,
        "yazen.ghannam@....com" <yazen.ghannam@....com>
Subject: Re: [RESEND v5 3/4] platform/chrome: cros_ec_debugfs: Fix permissions
 for panicinfo

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ