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]
Message-ID: <20070626095755.GA13085@frankl.hpl.hp.com>
Date:	Tue, 26 Jun 2007 02:57:55 -0700
From:	Stephane Eranian <eranian@....hp.com>
To:	Mikael Pettersson <mikpe@...uu.se>
Cc:	B.Steinbrink@....de, ak@...e.de, ingo@...e.hu,
	levon@...ementarian.org, linux-kernel@...r.kernel.org,
	oprofile-list@...ts.sourceforge.net, perfmon@...ali.hpl.hp.com,
	wcohen@...hat.com
Subject: Re: [PATCH 1/2] Always probe the NMI watchdog

Mikael,

On Tue, Jun 26, 2007 at 10:04:15AM +0200, Mikael Pettersson wrote:
> On Mon, 25 Jun 2007 23:04:25 +0200, B.Steinbrink@....de wrote:
> > > I think the tricky part is that we do want to reserve perfctr1 even
> > > though the NMI watchdog is not active. This comes from the fact that
> > > the NMI watchdog knows about only one counter and if it can't get that
> > > one, it probably fails.  By reserving it from the start, we ensure NMI
> > > watchdog will work when eventually activated.
> > 
> > Can you enable it later on at all? It failed for me when I tried,
> > because it didn't know which hardware to use. Had to pass the kernel
> > parameter to make the proc files do anything. Seems like it has to be
> > enable at boot to work at all.
> > 
> > And AFAICT we never unconditionally reserved a perfctr for the watchdog.
> 
> Yes you can dynamically enable/disable the NMI watchdog,
> at least if you booted with it enabled.
> 
> > In 2.6.21 the nmi watchdog, if enabled, just reserved its perfctrs and
> > everything else had to deal with it. Since the cleanup, the watchdog
> > will release its perfctr when disabled, so another subsystem can grab
> > it. But that also means that that other subsystem must release it again
> > before you can reenable the watchdog.
> 
> Which is the obvious and correct way to handle a shared resource.
> 
Agreed.

> Keeping parts of the PMU HW permanently reserved whether or not
> the watchdog is enabled would be a BUG.
> 
True. But the upside is that you guarantee the activation of the NMI
watchdog will always succeed which may be a valuable property given the
goal of the NMI watchdog. Otherwise, if Oprofile or perfmon are active,
the NMI will fail to grab a single counter.

-- 

-Stephane
-
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