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: <9593a9758731af70bdb6ad4f73af3ddc102571f1.camel@siemens.com>
Date:   Fri, 23 Dec 2022 11:22:30 +0000
From:   "Sverdlin, Alexander" <alexander.sverdlin@...mens.com>
To:     "manfred@...orfullife.com" <manfred@...orfullife.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "1vier1@....de" <1vier1@....de>,
        "tglx@...utronix.de" <tglx@...utronix.de>
Subject: Re: [PATCH 3/3] kernel/irq/manage.c: disable_irq() might sleep.

Hello Manfred,

On Fri, 2022-12-23 at 11:54 +0100, Manfred Spraul wrote:
> > I'm not sure about this, latest wait_event() inside
> > synchronize_irq()
> > has it already.
> > 
> > >           if (!__disable_irq_nosync(irq))
> > >                   synchronize_irq(irq);
> > >    }
> 
> That is the whole point: might_sleep() should be always called. We
> are 
> clarifying an API definition. Everyone who uses disable_irq() from 
> non-sleeping context should get a warning, 100% of the time.
> 
> Not just within synchronize_irq() if there is an active threaded irq 
> handler.

As I read it, it will warn almost always, even without threaded handler
configured, only in some error cases it will not warn. I'm just
thinking that disable_irq() might be in a hot path and this is being
checked anyway two calls deeper. But I don't have a strong opinion on
that and it looks like it has been taken into mm tree already.

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ