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, 23 Oct 2019 12:22:54 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Hayes Wang <hayeswang@...ltek.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     nic_swsd <nic_swsd@...ltek.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "pmalani@...omium.org" <pmalani@...omium.org>,
        "grundler@...omium.org" <grundler@...omium.org>,
        'Linux Samsung SOC' <linux-samsung-soc@...r.kernel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH net-next] r8152: support request_firmware for RTL8153

Hi Hayes,

On 23.10.2019 11:48, Hayes Wang wrote:
> Marek Szyprowski [mailto:m.szyprowski@...sung.com]
>> Sent: Wednesday, October 23, 2019 5:17 PM
>> Subject: Re: [PATCH net-next] r8152: support request_firmware for RTL8153
>>
>> Hi Hayes,
>>
>> On 16.10.2019 05:02, Hayes Wang wrote:
>>> This patch supports loading additional firmware file through
>>> request_firmware().
>>>
>>> A firmware file may include a header followed by several blocks
>>> which have different types of firmware. Currently, the supported
>>> types are RTL_FW_END, RTL_FW_PLA, and RTL_FW_USB.
>>>
>>> The firmware is used to fix some compatible or hardware issues. For
>>> example, the device couldn't be found after rebooting several times.
>>>
>>> The supported chips are
>>> 	RTL_VER_04 (rtl8153a-2.fw)
>>> 	RTL_VER_05 (rtl8153a-3.fw)
>>> 	RTL_VER_06 (rtl8153a-4.fw)
>>> 	RTL_VER_09 (rtl8153b-2.fw)
>>>
>>> Signed-off-by: Hayes Wang <hayeswang@...ltek.com>
>>> Reviewed-by: Prashant Malani <pmalani@...omium.org>
>> This patch (which landed in linux-next last days) causes a following
>> kernel oops on the ARM 32bit Exynos5422 SoC based Odroid XU4 board:
> Please try the following patch.

Yes, this fixes the issue. I've applied those changes manually on top of 
Linux next-20191022, due to some differences in the context. When you 
prepare a final patch, feel free to add:

Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
Fixes: 9370f2d05a2a ("r8152: support request_firmware for RTL8153")
Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>


> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index d3c30ccc8577..283b35a76cf0 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -4000,8 +4000,8 @@ static void rtl8152_fw_mac_apply(struct r8152 *tp, struct fw_mac *mac)
>   static void rtl8152_apply_firmware(struct r8152 *tp)
>   {
>   	struct rtl_fw *rtl_fw = &tp->rtl_fw;
> -	const struct firmware *fw = rtl_fw->fw;
> -	struct fw_header *fw_hdr = (struct fw_header *)fw->data;
> +	const struct firmware *fw;
> +	struct fw_header *fw_hdr;
>   	struct fw_phy_patch_key *key;
>   	u16 key_addr = 0;
>   	int i;
> @@ -4009,6 +4009,9 @@ static void rtl8152_apply_firmware(struct r8152 *tp)
>   	if (IS_ERR_OR_NULL(rtl_fw->fw))
>   		return;
>   
> +	fw = rtl_fw->fw;
> +	fw_hdr = (struct fw_header *)fw->data;
> +
>   	if (rtl_fw->pre_fw)
>   		rtl_fw->pre_fw(tp);
>
>>> +static void rtl8152_apply_firmware(struct r8152 *tp)
>>> +{
>>> +	struct rtl_fw *rtl_fw = &tp->rtl_fw;
>>> +	const struct firmware *fw = rtl_fw->fw;
>>> +	struct fw_header *fw_hdr = (struct fw_header *)fw->data;
>>> +	int i;
>>> +
>>> +	if (IS_ERR_OR_NULL(rtl_fw->fw))
>>> +		return;
>>> +
>>> +	if (rtl_fw->pre_fw)
>>> +		rtl_fw->pre_fw(tp);
>>> +
>>>
Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ