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-next>] [day] [month] [year] [list]
Date:   Fri, 25 Feb 2022 23:53:21 +0530
From:   Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To:     kishon@...com, lorenzo.pieralisi@....com
Cc:     omp@...dia.com, vidyas@...dia.com, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, bjorn.andersson@...aro.org,
        dmitry.baryshkov@...aro.org
Subject: PCI: endpoint: Usage of atomic notifier chain

Hi,

While working with the PCI endpoint subsystem, I stumbled upon the sleeping
in atomic context bug during CORE_INIT phase. The issue seems to be due to the
usage of "epc lock" (mutex) in functions such as set_msi, set_msix,
write_header, etc...

These functions are supposed to be used in the atomic notifier chain by the
CORE_INIT notifier. While using the lock is necessary in these functions as
pci_epc_create() would've been called, I see two possible workarounds:

1. Using non-atomic notifier chains such as blocking or raw.
2. Modifying the EPF drivers to use workqueue in CORE_INIT notifier chain. But
this has the implication of missing the workqueue execution before hitting other
PCI events as there might be a delay in scheduling the work item.

I prefer 1st option but I'd like to hear other ideas also.

Thanks,
Mani

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ