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: <CAAo+4rX5nJo63ZF64d3rf7_QC+1pR+-EBH7_5JrsrJn1nhpkfQ@mail.gmail.com>
Date:   Wed, 28 Jun 2023 19:32:32 +0800
From:   Chengfeng Ye <dg573847474@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     scott.branden@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
        arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: bcm_vk: Fix potential deadlock on &vk->ctx_lock

Thanks for the reply! V2 patch is sent including more detail of the static
analyzer and testing process.

Best Regards,
Chengfeng

Greg KH <gregkh@...uxfoundation.org> 于2023年6月28日周三 19:00写道:
>
> On Wed, Jun 28, 2023 at 10:52:50AM +0000, Chengfeng Ye wrote:
> > As &vk->ctx_lock is acquired by timer bcm_vk_hb_poll() under softirq
> > context, other process context code should disable irq or bottom-half
> > before acquire the same lock, otherwise deadlock could happen if the
> > timer preempt the execution while the lock is held in process context
> > on the same CPU.
> >
> > Possible deadlock scenario
> > bcm_vk_open()
> >     -> bcm_vk_get_ctx()
> >     -> spin_lock(&vk->ctx_lock)
> >         <timer iterrupt>
> >         -> bcm_vk_hb_poll()
> >         -> bcm_vk_blk_drv_access()
> >         -> spin_lock_irqsave(&vk->ctx_lock, flags) (deadlock here)
> >
> > This flaw was found using an experimental static analysis tool we are
> > developing for irq-related deadlock.
> >
> > The tentative patch fix the potential deadlock by spin_lock_irqsave().
>
> how was this tested?  As per the file,
> Documentation/process/researcher-guidelines.rst, you have to show this.
>
> thanks,
>
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ