All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segoon@openwall.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: serge.hallyn@canonical.com,
	user-mode-linux-devel@lists.sourceforge.net,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, toralf.foerster@gmx.de,
	akpm@linux-foundation.org, torvalds@linux-foundation.org
Subject: Re: [uml-devel] shm updates broke UML
Date: Mon, 1 Aug 2011 21:32:06 +0400	[thread overview]
Message-ID: <20110801173206.GA26440@albatros> (raw)
In-Reply-To: <20110801172452.GA26190@albatros>

Marc,

On Mon, Aug 01, 2011 at 21:24 +0400, Vasiliy Kulikov wrote:
> On Mon, Aug 01, 2011 at 19:19 +0200, Marc Zyngier wrote:
> > Here you go (sorry about the line wrapping, damned webmail...):
> 
> Thank you!  Now I see that the problem is rw_mutex is not initialized:
> 
> 	down_write(&shm_ids(ns).rw_mutex);
> 
> void __sched __down_write_nested(struct rw_semaphore *sem, int subclass)
> {
>     ...
> 	if (sem->activity == 0 && list_empty(&sem->wait_list)) {
>                                          ^^^^^^^^^^^^^^^ is NULL
> 
> Wtf - ipc namespace should be fully initialized for the moment of
> threads run...

Does ARM try to run _any_ threads before do_initcalls()?  IPC
initialization is initcall, so any thread before do_initcalls() is a
dependency bug.

static void __init do_basic_setup(void)
{
	cpuset_init_smp();
	usermodehelper_init();
	init_tmpfs();
	driver_init();
	init_irq_proc();
	do_ctors();
	do_initcalls(); <<<<
}

Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


WARNING: multiple messages have this Message-ID (diff)
From: Vasiliy Kulikov <segoon@openwall.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Richard Weinberger <richard@nod.at>,
	serge.hallyn@canonical.com, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net,
	toralf.foerster@gmx.de
Subject: Re: shm updates broke UML
Date: Mon, 1 Aug 2011 21:32:06 +0400	[thread overview]
Message-ID: <20110801173206.GA26440@albatros> (raw)
In-Reply-To: <20110801172452.GA26190@albatros>

Marc,

On Mon, Aug 01, 2011 at 21:24 +0400, Vasiliy Kulikov wrote:
> On Mon, Aug 01, 2011 at 19:19 +0200, Marc Zyngier wrote:
> > Here you go (sorry about the line wrapping, damned webmail...):
> 
> Thank you!  Now I see that the problem is rw_mutex is not initialized:
> 
> 	down_write(&shm_ids(ns).rw_mutex);
> 
> void __sched __down_write_nested(struct rw_semaphore *sem, int subclass)
> {
>     ...
> 	if (sem->activity == 0 && list_empty(&sem->wait_list)) {
>                                          ^^^^^^^^^^^^^^^ is NULL
> 
> Wtf - ipc namespace should be fully initialized for the moment of
> threads run...

Does ARM try to run _any_ threads before do_initcalls()?  IPC
initialization is initcall, so any thread before do_initcalls() is a
dependency bug.

static void __init do_basic_setup(void)
{
	cpuset_init_smp();
	usermodehelper_init();
	init_tmpfs();
	driver_init();
	init_irq_proc();
	do_ctors();
	do_initcalls(); <<<<
}

Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

  reply	other threads:[~2011-08-01 17:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 13:41 shm updates broke UML Richard Weinberger
2011-08-01 13:49 ` Vasiliy Kulikov
2011-08-01 14:04   ` [uml-devel] " Richard Weinberger
2011-08-01 14:04     ` Richard Weinberger
2011-08-01 16:01   ` Marc Zyngier
2011-08-01 16:01     ` Marc Zyngier
2011-08-01 17:10     ` Vasiliy Kulikov
2011-08-01 17:19       ` Marc Zyngier
2011-08-01 17:19         ` Marc Zyngier
2011-08-01 17:24         ` [uml-devel] " Vasiliy Kulikov
2011-08-01 17:24           ` Vasiliy Kulikov
2011-08-01 17:32           ` Vasiliy Kulikov [this message]
2011-08-01 17:32             ` Vasiliy Kulikov
2011-08-01 17:43             ` Marc Zyngier
2011-08-04 11:04           ` Toralf Förster
2011-08-04 11:04             ` Toralf Förster
2011-08-04 11:16             ` [uml-devel] " Vasiliy Kulikov
2011-08-04 11:16               ` Vasiliy Kulikov
2011-08-01 17:20       ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110801173206.GA26440@albatros \
    --to=segoon@openwall.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=richard@nod.at \
    --cc=serge.hallyn@canonical.com \
    --cc=toralf.foerster@gmx.de \
    --cc=torvalds@linux-foundation.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.