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]
Date: Sun, 18 Feb 2024 13:21:53 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Changbin Du <changbin.du@...wei.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>, <linux-modules@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, Xiaoyi Su <suxiaoyi@...wei.com>, Eric
 Chanudet <echanude@...hat.com>
Subject: Re: [PATCH v3] modules: wait do_free_init correctly

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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ