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: <Yni1CKb20D99kAce@matsya>
Date:   Mon, 9 May 2022 12:00:32 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Bard Liao <yung-chuan.liao@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        gregkh@...uxfoundation.org, srinivas.kandagatla@...aro.org,
        pierre-louis.bossart@...ux.intel.com, sanyog.r.kale@...el.com,
        bard.liao@...el.com
Subject: Re: [PATCH] soundwire: cadence: recheck device0 attachment after
 status change

On 20-04-22, 10:30, Bard Liao wrote:
> From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
> 
> This patch adds a status check after device0 attachment to solve race
> conditions observed during attachment with multiple devices per link
> 
> The sequence is the following
> 
> 1) deviceA attaches as device0
> 
> 2) the hardware detects a device0 status change and throws an
>  interrupt.
> 
> 3) the interrupt handler schedules the work function
> 
> 4) the workqueue starts, we read the status
> slave0 = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT0);
> slave1 = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT1);
> 
> we deal with the status change and program deviceA device number to a
> non-zero value.
> 
> 5) deviceB attaches as device0, the device0 status seen by the
> hardware does not change.
> 
> 6) we clear the CDNS_MCP_SLAVE_INTSTAT0/1 registers -> we will never detect
> deviceB!
> 
> This patch suggest re-checking in a loop the device0 status with a
> PING frame, i.e. using the real device0 status instead of information
> on status changes.

Applied, thanks

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ