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]
Date:	Tue, 01 Feb 2011 17:08:27 +0000
From:	Will Deacon <will.deacon@....com>
To:	Ming Lei <tom.leiming@...il.com>
Cc:	Santosh Shilimkar <santosh.shilimkar@...com>,
	linux-kernel@...r.kernel.org, oprofile-list@...ts.sf.net,
	Robert Richter <robert.richter@....com>
Subject: Re: [PATCH v2] oprofile: add SMP barriers for hrtimer hotplug code

On Tue, 2011-02-01 at 08:03 +0000, Ming Lei wrote:
> Hi,
> 
Hello Lei Ming,

> 2011/2/1 Santosh Shilimkar <santosh.shilimkar@...com>:
> >> -----Original Message-----
> >> From: Will Deacon [mailto:will.deacon@....com]
> >> diff --git a/drivers/oprofile/timer_int.c
> >> b/drivers/oprofile/timer_int.c
> >> index 0107251..a3a94ea 100644
> >> --- a/drivers/oprofile/timer_int.c
> >> +++ b/drivers/oprofile/timer_int.c
> >> @@ -48,6 +48,7 @@ static int oprofile_hrtimer_start(void)
> >>  {
> >>       get_online_cpus();
> >>       ctr_running = 1;
> >> +     smp_mb();
> >>       on_each_cpu(__oprofile_hrtimer_start, NULL, 1);
> 
> Just a little question:
> 
> Before calling __oprofile_hrtimer_start in other CPUs,
> there have been some smp_mb executed already, such as called by
> smp_call_function_many in current CPU, and called by
> generic_smp_call_function_interrupt in the func-calling CPU,
> so are these smp_mb enough for correct order of access
> for 'ctr_running' ?

I didn't dive into the guts of the cross-calling implementation, but it
appears that you're correct. There's also the csd_{un}lock functions
which have smp_mb() in them too, so I think we have plenty of barrier
goodness as it is.

I'll trash the patch.

Cheers,

Will


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