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]
Date:	Tue, 07 Jul 2009 08:56:00 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Borislav Petkov <borislav.petkov@....com>
CC:	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [x86, msr]: remove code duplication

Borislav Petkov wrote:
> 
> Actually, the more important question is why am I executing anything on
> my own CPU without first checking if it is in the cpumask _at_ _all_?!
> /me ducks behind the sofa.
> 
> The right thing to do should be something like the following:
> 
> preempt_disable();
> this_cpu = raw_smp_processor_id();
> 
> if (cpumask_test_cpu(this_cpu, mask)) {
> 	local_irq_disable();
> 	msr_func(&rv);
> 	local_irq_enable();
> }
> 
> smp_call_function_many(mask, msr_func, &rv, 1);
> preempt_enable();
> 

I don't see why you're disabling local IRQs.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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