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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <000401d3ff17$4496a390$cdc3eab0$@codeaurora.org>
Date:   Fri, 8 Jun 2018 16:25:45 +0530
From:   "sayali" <sayalil@...eaurora.org>
To:     "'Greg Kroah-Hartman'" <gregkh@...uxfoundation.org>,
        "'Stanislav Nijnikov'" <Stanislav.Nijnikov@....com>,
        <martin.petersen@...cle.com>
Cc:     <subhashj@...eaurora.org>, <cang@...eaurora.org>,
        <vivek.gautam@...eaurora.org>, <rnayak@...eaurora.org>,
        <vinholikatti@...il.com>, <jejb@...ux.vnet.ibm.com>,
        <martin.petersen@...cle.com>, <asutoshd@...eaurora.org>,
        <evgreen@...omium.org>,
        "'Bart Van Assche'" <Bart.VanAssche@....com>,
        <linux-scsi@...r.kernel.org>,
        "'Adrian Hunter'" <adrian.hunter@...el.com>,
        "'open list'" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision

Hi Greg / Stanislav,

Thank you for your comments. 
Updated my comments inline. Please check.

Thanks,
Sayali
-----Original Message-----
From: Greg Kroah-Hartman [mailto:gregkh@...uxfoundation.org] 
Sent: Tuesday, June 05, 2018 2:12 PM
To: Stanislav Nijnikov <Stanislav.Nijnikov@....com>
Cc: Sayali Lokhande <sayalil@...eaurora.org>; subhashj@...eaurora.org;
cang@...eaurora.org; vivek.gautam@...eaurora.org; rnayak@...eaurora.org;
vinholikatti@...il.com; jejb@...ux.vnet.ibm.com; martin.petersen@...cle.com;
asutoshd@...eaurora.org; evgreen@...omium.org; Bart Van Assche
<Bart.VanAssche@....com>; linux-scsi@...r.kernel.org; Adrian Hunter
<adrian.hunter@...el.com>; open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision

On Tue, Jun 05, 2018 at 08:16:50AM +0000, Stanislav Nijnikov wrote:
> Hi Sayali,
> 
> I think that passing an array of values in a string is not proper way 
> to work with a sysfs entry. There are binary attributes to do such 
> things.

No, don't do that, sysfs is for "one value per file", and binary attributes
are for "hardware value pass-through" type stuff.  Unless this is "raw" data
straight from the hardware, binary does not work, and neither does a normal
sysfs file either.

So this needs to be reworked please.

[Sayali] As per Documentation/filesystems/sysfs.txt :
	"Attributes should be ASCII text files, preferably with only one
value per file. It is noted that it may not be efficient to contain only one
value per file, 	so it is socially acceptable to express an array of
values of the same type."
	So it seems sysfs can be used to pass more than one value given that
they are of same type (which is ensured as I am passing char string).
	Also I have noticed , in scsi_sysfs.c (store_scan() or scsi_scan()),
we do pass char buffer (more than one value) via sysfs .
	As sysfs is already being used to read descriptors, I thought of
using sysfs as write interface for configuration descriptor.
	Appreciate, if you could suggest me some other interfaces that can
be used here (allow passing more than one value) or
	do you think I need to pass each configurable parameter one by one
for provisioning ?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ