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: <e5ca6ffa-ccc1-06a0-4382-2b6cf4f75548@suse.com>
Date:   Tue, 7 Feb 2023 15:03:18 +0100
From:   Juergen Gross <jgross@...e.com>
To:     Dan Carpenter <error27@...il.com>, xen-devel@...ts.xenproject.org
Cc:     Julia Lawall <julia.lawall@...ia.fr>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Hongchen Zhang <zhanghongchen@...ngson.cn>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Christian Brauner (Microsoft)" <brauner@...nel.org>,
        David Howells <dhowells@...hat.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        maobibo <maobibo@...ngson.cn>,
        Matthew Wilcox <willy@...radead.org>,
        Sedat Dilek <sedat.dilek@...il.com>
Subject: Re: xen: sleeping in atomic warnings

On 07.02.23 14:37, Dan Carpenter wrote:
> These are static checker warnings from Smatch.  The line numbers are
> based on next-20230207.  To reproduce these warnings then you need to
> have the latest Smatch from git and you need to rebuild the cross
> function probably four times.  I have reviewed most of these and they
> all seem valid to me.  I remember I reported some a while back but never
> heard back.  https://lore.kernel.org/all/20210802144037.GA29540@kili/
> 
> regards,
> dan carpenter
> 
> arch/x86/xen/p2m.c:189 alloc_p2m_page() warn: sleeping in atomic context
> xen_create_contiguous_region() <- disables preempt
> xen_destroy_contiguous_region() <- disables preempt
> -> xen_remap_exchanged_ptes()
>     -> set_phys_to_machine()
>        -> xen_alloc_p2m_entry()
>           -> alloc_p2m_pmd()
> xen_alloc_p2m_entry() <duplicate>
>              -> alloc_p2m_page()

Those allocations can't be reached after early boot.

> drivers/xen/events/events_base.c:1213 bind_evtchn_to_irq_chip() warn: sleeping in atomic context
> pvcalls_front_connect() <- disables preempt
> pvcalls_front_accept() <- disables preempt
> -> create_active()
>     -> bind_evtchn_to_irqhandler()
>        -> bind_evtchn_to_irqhandler_chip()
>           -> bind_evtchn_to_irq_chip()

Yes, that one looks very suspicious. Basically the same problem as all
the other pvcalls issues below.

> drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:303 netxen_pcie_sem_lock() warn: sleeping in atomic context
> netxen_nic_hw_write_wx_2M() <- disables preempt
> netxen_nic_hw_read_wx_2M() <- disables preempt
> -> netxen_pcie_sem_lock()

This is not Xen related.

> drivers/xen/xen-pciback/pci_stub.c:110 pcistub_device_release() warn: sleeping in atomic context
> pcistub_get_pci_dev_by_slot() <- disables preempt
> pcistub_get_pci_dev() <- disables preempt
> -> pcistub_device_get_pci_dev()
>     -> pcistub_device_put()
>        -> pcistub_device_release()

Seems top be problematic, too.

> drivers/xen/xen-scsiback.c:1016 __scsiback_del_translation_entry() warn: sleeping in atomic context
> scsiback_del_translation_entry() <- disables preempt
> scsiback_release_translation_entry() <- disables preempt
> -> __scsiback_del_translation_entry()

Needs fixing (same fix as the other scsiback issue).

Thanks for the reports,


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ