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] [day] [month] [year] [list]
Date:   Fri, 11 Sep 2020 16:05:40 +0800
From:   Xiongfeng Wang <wangxiongfeng2@...wei.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     <mchehab@...nel.org>, <tony.luck@...el.com>,
        <linux-edac@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] EDAC/mc_sysfs: add missing newlines when printing
 'max(dimm)_location'



On 2020/9/10 19:00, Borislav Petkov wrote:
> On Fri, Sep 04, 2020 at 04:19:23PM +0800, Xiongfeng Wang wrote:
>> When I cat 'max_location' and 'dimm_location' by sysfs, it displays as
>> follows. It's better to add a newline for easy reading.
>>
>> [root@...alhost /]# cat /sys/devices/system/edac/mc/mc0/max_location
>> memory 3 [root@...alhost /]# cat /sys/devices/system/edac/mc/mc0/dimm0/dimm_location
>> memory 0 [root@...alhost /]#
> 
> Please use this commit message for your next version:
> 
> EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location
> 
> Reading those sysfs entries gives:
> 
>   [root@...alhost /]# cat /sys/devices/system/edac/mc/mc0/max_location
>   memory 3 [root@...alhost /]# cat /sys/devices/system/edac/mc/mc0/dimm0/dimm_location
>   memory 0 [root@...alhost /]#
> 
> Add newlines after the value it prints for better readability.

Thanks for your advice. I will add it in the next version.

> 
>> @@ -821,6 +825,7 @@ static ssize_t mci_max_location_show(struct device *dev,
>>  			     edac_layer_name[mci->layers[i].type],
>>  			     mci->layers[i].size - 1);
>>  	}
>> +	p += sprintf(p, "\n");
> 
> No size checking here?

I can check if it's larger than PAGE_SIZE.

Thanks,
Xiongfeng

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ