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: <20061213222616.GJ2418@redhat.com>
Date:	Wed, 13 Dec 2006 17:26:16 -0500
From:	Dave Jones <davej@...hat.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Rudolf Marek <r.marek@...embler.cz>, norsk5@...ssion.com,
	lkml <linux-kernel@...r.kernel.org>,
	LM Sensors <lm-sensors@...sensors.org>,
	bluesmoke-devel@...ts.sourceforge.net
Subject: Re: [RFC] new MSR r/w functions per CPU

On Wed, Dec 13, 2006 at 02:19:52PM -0800, H. Peter Anvin wrote:

 > > void rdmsr_on_cpu(unsigned int cpu, unsigned long msr, unsigned long *lo, unsigned long *hi)
 > > {
 > >     cpumask_t oldmask;
 > > 
 > >     oldmask = current->cpus_allowed;
 > >     set_cpus_allowed(current, cpumask_of_cpu(cpu));
 > > 
 > > 	rdmsr(msr, &lo, &hi);
 > > 
 > >     set_cpus_allowed(current, oldmask);
 > > }
 > > 
 > 
 > [The above doesn't work, by the way.  This approach was discussed a long 
 > time ago, and vetoed due to the potential for deadlock.]

Can you explain this a little further? I'm fairly certain
there are places in the kernel already doing this (or similar).
In fact, I cut-n-pasted most of the above from similar code in the
powernow-k8 driver.  What exactly can we deadlock on?

		Dave

-- 
http://www.codemonkey.org.uk
-
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