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]
Message-ID: <60f89c4e-91e0-e660-58e7-5b152bc3e8e7@gmail.com>
Date:   Tue, 24 Mar 2020 18:03:09 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     "Wang, Jiada" <jiada_wang@...tor.com>, jikos@...nel.org,
        benjamin.tissoires@...hat.com, rydberg@...math.org,
        dmitry.torokhov@...il.com, nick@...anahar.org, bsz@...ihalf.com
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        erosca@...adit-jv.com, Andrew_Gabbasov@...tor.com
Subject: Re: [PATCH v7 00/48] atmel_mxt_ts misc

24.03.2020 17:54, Dmitry Osipenko пишет:
> 23.03.2020 05:25, Wang, Jiada пишет:
>> Hello Dmitry
>>
>> On 2020/03/21 0:53, Dmitry Osipenko wrote:
>>> Hello Jiada,
>>>
>>> 20.03.2020 06:37, Wang, Jiada пишет:
>>>> Hello Dmitry
>>>>
>>>> I have submitted v8 patch-set to address your comments towards v7
>>>> patch-set,
>>>> most of checkpatch warnings and errors have been addressed,
>>>>
>>>> But I didn't update for following two types of warnings
>>>> since I want to keep consistency with legacy code
>>>>
>>>> WARNING: DEVICE_ATTR unusual permissions '0600' used
>>>> #290: FILE: drivers/input/touchscreen/atmel_mxt_ts.c:3761:
>>>> +static DEVICE_ATTR(debug_v2_enable, 0600, NULL,
>>>
>>> What will happen if you'll use 0644? Will an empty line be returned or
>>> driver will crash?
>>>
>> debug_v2_enable doesn't have .show callback implemented, so after change
>> permission to 644, read of it results in an I/O error,
>>
>> for other 0600 permission interfaces (t38_data, t25 and debug_enable)
>> added in this series,
>> change to 644 can return expected information when read.
>>
>> Do you think it's better to change debug_v2_enable to 0200,
>> and others to 0644?
> 
> Since the debug_enable has mxt_debug_enable_show(), the same should be
> done for debug_v2_enable, for consistency.
> 
> The permissions should be 0644 for everything that is read/write.
> 
> The 0200 should be used for everything that is root-only and write-only.
> 

Also, please take a look at [1], see DEVICE_ATTR_WO() and
DEVICE_BOOL_ATTR() macros, which should be handy.

[1]
https://elixir.bootlin.com/linux/v5.6-rc7/source/include/linux/device.h#L125

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ