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: <20111028183347.GE3452@redhat.com>
Date:	Fri, 28 Oct 2011 14:33:47 -0400
From:	Don Zickus <dzickus@...hat.com>
To:	Seiji Aguchi <seiji.aguchi@....com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Chen, Gong" <gong.chen@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Luck, Tony" <tony.luck@...el.com>,
	Matthew Garrett <mjg@...hat.com>,
	Vivek Goyal <vgoyal@...hat.com>,
	"len.brown@...el.com" <len.brown@...el.com>,
	"ying.huang@...el.com" <ying.huang@...el.com>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"hughd@...omium.org" <hughd@...omium.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"jmorris@...ei.org" <jmorris@...ei.org>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"namhyung@...il.com" <namhyung@...il.com>,
	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	Satoru Moriya <satoru.moriya@....com>
Subject: Re: [RFC][PATCH v2 -next 2/2] Adding lock operations to
 kmsg_dump()/pstore_dump()

On Fri, Oct 21, 2011 at 05:21:35PM -0400, Seiji Aguchi wrote:
> pstore_dump()/kmsg_dump() may be called everywhere in kernel.
> So we have to care about following cases.
> 
>   - Panic path
>     In this case, Logging message process is serialized via smp_send_stop().
>     So, we can bust spin_locks.
> 
>     Currently, kmsg_dump() may be called twice (KMSG_DUMP_PANIC and KMSG_DUMP_EMERGY)
>     So, for avoiding deadlock, I suggest to bust locks rather than skipping them.
> 
>   - NMI context 
>      While a cpu is in NMI handler, other cpus may be running.
>      So, trylock should be called so that lockdep cheking works.
>  
>   - Process context
>     In this case, we can simply take locks.

It ain't pretty but it moves things towards a more reliable message dump.
The odds of us needing to bust the spinlocks are really small.  Most of
the time no one reads the pstore filesystem.

I would love to figure out a prettier solution for this locking mess, but
I can't think of anything.  We have customers who want to utilize this
technology, so I am trying to make sure it is stable and robust for now.
A little selfish I suppose.  But we are open to ideas?

Acked-by: Don Zickus <dzickus@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ