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: <6f6b0ac7-37d8-e2a1-3249-223905c2a5b1@collabora.com>
Date:   Mon, 9 Dec 2019 15:41:33 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     Lee Jones <lee.jones@...aro.org>,
        Raul E Rangel <rrangel@...omium.org>
Cc:     Wolfram Sang <wsa@...-dreams.de>, Akshu.Agrawal@....com,
        Guenter Roeck <groeck@...omium.org>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        linux-kernel@...r.kernel.org,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        linux-i2c@...r.kernel.org, Benson Leung <bleung@...omium.org>
Subject: Re: [PATCH 4/4] platform/chrome: i2c: i2c-cros-ec-tunnel: Convert i2c
 tunnel to MFD Cell

Hi Lee,

On 9/12/19 14:17, Lee Jones wrote:
> On Thu, 21 Nov 2019, Raul E Rangel wrote:
> 
>> If the i2c-cros-ec-tunnel driver is compiled into the kernel, it is
>> possible that i2c-cros-ec-tunnel could be probed before cros_ec_XXX
>> has finished initializing and setting the drvdata. This would cause a
>> NULL pointer panic.
>>
>> Converting this driver over to an MFD solves the problem and aligns with
>> where the cros_ec is going.
>>
>> Signed-off-by: Raul E Rangel <rrangel@...omium.org>
>> ---
>> You can now see the device node lives under the mfd device.
>>
>> $ find /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/ -iname firmware_node -exec ls -l '{}' \;
>> /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/firmware_node -> ../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00
>> /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/i2c-9/firmware_node -> ../../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00
>> /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/i2c-9/i2c-10EC5682:00/firmware_node -> ../../../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00/10EC5682:00
>>
>>  drivers/i2c/busses/i2c-cros-ec-tunnel.c | 36 +++++++++----------------
>>  drivers/mfd/cros_ec_dev.c               | 19 +++++++++++++
> 
> For my own reference:
>   Acked-for-MFD-by: Lee Jones <lee.jones@...aro.org>
> 

Note that there is a v2 for this patch and I did some comments [1]

Thanks,
 Enric

[1] https://patchwork.ozlabs.org/patch/1200560/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ