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:   Tue, 7 Jan 2020 12:32:33 +0100
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Hans de Goede <hdegoede@...hat.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Felipe Balbi <balbi@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3: use proper initializers for property entries

Hi All,

On 15.12.2019 17:41, Hans de Goede wrote:
> Hi,
>
> On 13-12-2019 18:46, Dmitry Torokhov wrote:
>> We should not be reaching into property entries and initialize them by
>> hand, but rather use proper initializer macros. This way we can alter
>> internal representation of property entries with no visible changes to
>> their users.
>>
>> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
>> Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
>> ---
>>
>> It would be good if this could go through Rafael's tree as it is needed
>> for the rest of my software_node/property_entry rework patch series
>> which I would love not to delay till 5.6.
>
> Patch looks good to me:
>
> Acked-by: Hans de Goede <hdegoede@...hat.com>

This patch is instantly needed as the issue it fixes is again triggered 
in current (20200107) linux-next by commit e6bff4665c59 "software node: 
replace is_array with is_inline".

Felipe: could You ack it, so it could be merged via Rafael's tree 
together with related device property changes?

>>
>>   drivers/usb/dwc3/host.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
>> index 5567ed2cddbec..fa252870c926f 100644
>> --- a/drivers/usb/dwc3/host.c
>> +++ b/drivers/usb/dwc3/host.c
>> @@ -88,10 +88,10 @@ int dwc3_host_init(struct dwc3 *dwc)
>>       memset(props, 0, sizeof(struct property_entry) * 
>> ARRAY_SIZE(props));
>>         if (dwc->usb3_lpm_capable)
>> -        props[prop_idx++].name = "usb3-lpm-capable";
>> +        props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable");
>>         if (dwc->usb2_lpm_disable)
>> -        props[prop_idx++].name = "usb2-lpm-disable";
>> +        props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable");
>>         /**
>>        * WORKAROUND: dwc3 revisions <=3.00a have a limitation
>> @@ -103,7 +103,7 @@ int dwc3_host_init(struct dwc3 *dwc)
>>        * This following flag tells XHCI to do just that.
>>        */
>>       if (dwc->revision <= DWC3_REVISION_300A)
>> -        props[prop_idx++].name = "quirk-broken-port-ped";
>> +        props[prop_idx++] = 
>> PROPERTY_ENTRY_BOOL("quirk-broken-port-ped");
>>         if (prop_idx) {
>>           ret = platform_device_add_properties(xhci, props);
>>
>
Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ