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] [day] [month] [year] [list]
Date:   Wed, 25 Apr 2018 19:47:17 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     tytso@....edu
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] random: fix possible sleeping allocation from irq context

Theodore Y. Ts'o wrote:
> On Wed, Apr 25, 2018 at 09:46:42AM +0900, Tetsuo Handa wrote:
> > Theodore Ts'o wrote:
> > > We can do a sleeping allocation from an irq context when CONFIG_NUMA
> > > is enabled.  Fix this by initializing the NUMA crng instances in a
> > > workqueue.
> > 
> > Offloading to workqueue context itself would be OK,
> > but this patch makes linux.git unbootable because
> > 
> > 	if (crng == &primary_crng && crng_init < 2) {
> > 		invalidate_batched_entropy();
> > 		numa_crng_init(); // <= Deferred to workqueue context.
> > 		crng_init = 2; // <= Not waiting for workqueue context, and oops before console becomes ready. ;-)
> > 		process_random_ready_list();
> > 		wake_up_interruptible(&crng_init_wait);
> > 		pr_notice("random: crng init done\n");
> > 	}
> > 
> > Please don't pretend rng_ready() before workqueue context is processed.
> 
> Where's the oops?

I assumed an oops happened, for the kernel did not start printing messages even
after 1 minute from guest's power on, and CPU usage (seen from host side) says
that 1 CPU is busy-looping; which is a phenomenon that the kernel panic()ed at
very early stage. And reverting only your patch solved the problem.

But I can no longer reproduce it. I should have saved the kernel config...
So, if nobody sees regression, please go with your patch.

-DECLARE_WORK(numa_crng_init_work, do_numa_crng_init);
+static DECLARE_WORK(numa_crng_init_work, do_numa_crng_init);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ