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:   Mon, 22 May 2017 23:38:18 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Andreas Noever <andreas.noever@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <yehezkel.bernat@...el.com>,
        Lukas Wunner <lukas@...ner.de>,
        Amir Levy <amir.jer.levy@...el.com>,
        Andy Lutomirski <luto@...nel.org>, Mario.Limonciello@...l.com,
        Jared.Dominguez@...l.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 02/24] thunderbolt: Do not try to read UID if DROM offset
 is read as 0

On Mon, May 22, 2017 at 08:41:22PM +0200, Andreas Noever wrote:
> Yes there is a check for the root switch, but also one that checks the
> return code of tb_drom_read_uid_only :)
> 
> err = tb_drom_read_uid_only(sw, &uid);
> if (err) {
>     tb_sw_warn(sw, "uid read failed\n");
>     return err;
> }
> if (sw != sw->tb->root_switch && sw->uid != uid) {
> 
> 
> The reason it works on the Mac is because drom_offset is not 0, so the
> new branch in tb_drom_read_uid_only is not taken. Probably this is the
> case for all Cactus Ridge models and Alpine Ridge doesn't go there
> since it uses the ICM? 

Yes in case of ICM we don't call the function at all.

> Still it wouldn't hurt to only read the uid if
> sw != root_switch, the value is not used if sw == root_switch.

I agree. I'll update the code so that it will only read and check UID
when we are not dealing with the root switch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ