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: <Yk2vKqLSN3aqGiZK@slm.duckdns.org>
Date:   Wed, 6 Apr 2022 05:18:02 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Imran Khan <imran.f.khan@...cle.com>, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH v7 1/8] kernfs: Introduce interface to access
 global kernfs_open_file_mutex.

Hello,

On Wed, Apr 06, 2022 at 02:54:44PM +0000, Al Viro wrote:
> On Wed, Apr 06, 2022 at 02:54:19PM +1000, Imran Khan wrote:
> 
> > > BTW, speaking of kernfs_notify() - can calls of that come from NMI handlers?
> > > If not, I'd consider using llist for kernfs_notify_list...
> > 
> > I see it gets invoked from 3 places only: cgroup_file_notify,
> > sysfs_notify and sysfs_notify_dirent. So kernfs_notify should not be
> > getting invoked in NMI context. I will make the llist transition in next
> > version.
> 
> Er...  Are you sure neither of those is ever called from something that is
> called from .... from NMI?
> 
> It might never happen, but there's a plenty of callchains leading to that
> thing and no obvious obstacles for some of those to come from NMI context;
> I don't see it documented anywhere either.
> 
> Tejun, could you comment on that one?

I don't know any case off the top of my head and expectedly all the common
cases don't involved nmi. If we're worried about being called from nmis, I'd
go for just adding WARN_ON_ONCE(in_nmi()).

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ