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]
Message-ID: <CACKFLinbowscXBnaHmTQ-f8SEO1j4ObTW5N5R1G6eLnXS2POfw@mail.gmail.com>
Date:   Tue, 28 Nov 2017 09:11:55 -0800
From:   Michael Chan <michael.chan@...adcom.com>
To:     David Miller <davem@...emloft.net>
Cc:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Netdev <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'

On Tue, Nov 28, 2017 at 7:56 AM, David Miller <davem@...emloft.net> wrote:
> From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Date: Tue, 21 Nov 2017 20:46:49 +0100
>
>> Error code returned by 'bnxt_read_sfp_module_eeprom_info()' is handled a
>> few lines above when reading the A0 portion of the EEPROM.
>> The same should be done when reading the A2 portion of the EEPROM.
>>
>> In order to correctly propagate an error, update 'rc' in this 2nd call as
>> well, otherwise 0 (success) is returned.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>
> Patch applied, thanks Chrisophe.
>
> I cannot see any legitimate reason to ignore errors returned here, as
> an error would mean a partial read back of the data to the caller.

Sorry I was on vacation and missed this earlier.  The reason we don't
check for errors in the 2nd part is that the 2nd page may not be
present on some eeproms.

But I think the patch is fine because we return the proper length in
.get_module_info().  So we will now return error only if the user
specifies an invalid length, which is fine.  Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ