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: <Yfl4Othg/8VWpd3u@slm.duckdns.org>
Date:   Tue, 1 Feb 2022 08:13:14 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Igor Pylypiv <ipylypiv@...gle.com>,
        Luis Chamberlain <mcgrof@...nel.org>,
        linux-modules@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Changyuan Lyu <changyuanl@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] Revert "module, async: async_synchronize_full() on
 module init iff async is used"

Hello,

On Fri, Jan 28, 2022 at 09:39:12AM +0200, Linus Torvalds wrote:
> However, we've done this for *so* long that I wonder if there might be
> situations that have ended up depending on the lack of synchronization
> for pure performance reasons.
> 
> If *this* module loading process started the async work, then we'd
> wait for it, but what if there's other async work that was started by
> others? This revert would now make us wait for that async work too,
> and that might be a big deal slowing things down at boot time.
> 
> Looking at it, this is all under the 'module_mutex', so I guess we are
> already single-threaded at least wrt loading other modules, so the
> amount of unrelated async work going on is presumably fairly low and
> that isn't an issue.

Looks like we're multi-threaded while running the mod inits which launch the
async jobs and single-threaded while waiting for them to finish. Greg should
know a lot better than me but according to my hazy memory and cursory code
reading udev is multi-processed when loading modules, which makes it a lot
less likely that this will impact boot time in most cases.

> Anyway, I think this patch is the right thing to do, but just the fact
> that we've avoided that async wait for so long makes me a bit nervous
> about fallout from the revert.
> 
> Comments? Maybe this is a "just apply it, see if somebody screams" situation?

So, yeah, I think the risk is pretty low and even in the unlikely case that
someone is affected, the workaround is pretty straight-forward - not waiting
for the module loading to finish if appropriate.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ