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: <5bq77rkoutmjzv2fuw2jjsmqxfzsv2wiyz3swvpgs7hsbyxtpx@pgczoajxjvuy>
Date: Tue, 20 Feb 2024 23:09:40 -0500
From: Eric Chanudet <echanude@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Changbin Du <changbin.du@...wei.com>, 
	Luis Chamberlain <mcgrof@...nel.org>, linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Xiaoyi Su <suxiaoyi@...wei.com>
Subject: Re: [PATCH v3] modules: wait do_free_init correctly

On Sun, Feb 18, 2024 at 01:21:53PM -0800, Andrew Morton wrote:
> On Sat, 17 Feb 2024 16:18:10 +0800 Changbin Du <changbin.du@...wei.com> wrote:
> > The synchronization here is just to ensure the module init's been freed
> > before doing W+X checking. But the commit 1a7b7d922081 ("modules: Use
> > vmalloc special flag") moves do_free_init() into a global workqueue
> > instead of call_rcu(). So now rcu_barrier() can not ensure that do_free_init
> > has completed. We should wait it via flush_work().
> > 
> > Without this fix, we still could encounter false positive reports in
> > W+X checking, and the rcu synchronization is unnecessary which can
> > introduce significant delay.
> > 
> > Eric Chanudet reports that the rcu_barrier introduces ~0.1s delay on a
> > PREEMPT_RT kernel.
> >   [    0.291444] Freeing unused kernel memory: 5568K
> >   [    0.402442] Run /sbin/init as init process
> > 
> > With this fix, the above delay can be eliminated.
> 
> Thanks, I'll queue this as a delta, to be folded into the base patch
> prior to upstreaming.
> 
> I added a Tested-by: Eric, if that's OK by him?

Absolutely, I should have put it in my initial reply.
Adding here as confirmation:
Tested-by: Eric Chanudet <echanude@...hat.com>

Thanks,

-- 
Eric Chanudet


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ