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: <20110615185801.GA2461@sgi.com>
Date:	Wed, 15 Jun 2011 13:58:01 -0500
From:	Cliff Wickman <cpw@....com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1 of 6] x86, UV: smp_processor_id in a preemptable region

On Wed, Jun 15, 2011 at 10:21:42AM -0700, H. Peter Anvin wrote:
> On 06/15/2011 09:40 AM, Cliff Wickman wrote:
> > 
> > So would you say I should really widen the scope of the non-preemptible
> > region to include everything done with the results of that call to
> > smp_processor_id()?  
> > Which in this case is the call to parse_tunables_write().
> > Like this:
> > 
> >         preempt_disable();
> >         bcp = &per_cpu(bau_control, smp_processor_id());
> > 
> >         ret = parse_tunables_write(bcp, instr, count);
> >         preempt_enable_no_resched();
> > 
> 
> Funny enough, this is such a common pattern that we have helpers for it.
> We call this get_cpu() ... put_cpu().
> 
> 	-hpa

OK thanks.  I'll use them.


I'll fix that patch (1 of 8) and refresh/resend the whole series after a
little time to allow for more reviews of the others.

-Cliff
-- 
Cliff Wickman
SGI
cpw@....com
(651) 683-3824
--
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