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:	Thu, 06 Aug 2009 13:32:59 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Problem with percpu values when bringing up second CPU?

On 08/04/09 18:31, Rusty Russell wrote:
> On Wed, 5 Aug 2009 08:28:34 am Jeremy Fitzhardinge wrote:
>   
>> Hi,
>>
>> I just tracked down a bug I was having to a change where I changed one
>> of my Xen event channel variables to a percpu variable, relating to
>> masking an event channel.
>>
>> The symptom was that shortly after bringing up the second CPU, the first
>> CPU's timer events stopped arriving, apparently because they had become
>> masked.
>>
>> The event channels masks are declared as:
>>
>> #define NR_EVENT_CHANNEL_LONGS (NR_EVENT_CHANNELS/BITS_PER_LONG)
>> static DEFINE_PER_CPU(unsigned long,
>>                      cpu_evtchn_mask[NR_EVENT_CHANNEL_LONGS]) =
>>        {[0 ... NR_EVENT_CHANNEL_LONGS-1] = ~0ul };	/* everything masked by default */
>>
>>
>> My theory about what's happening is that when the second CPU comes up,
>> it allocates separate percpu areas for each CPU, but it is somehow
>> failing to accurately copy CPU 0's percpu data over
>>     
>
> If you touch the per-cpu vars before setup_per_cpu_areas(), you will hit the
> master copy.
>
> Is that possible?
>   

Likely, I think.   It depends on whether interrupts can happen before
that point.   But hitting the master copy should be OK.

However, the problem I'm seeing happens when the second CPU starts.  I
was working on the assumption that that's when the transfer from master
to allocated copy happens, but it looks like I'm mistaken.

Maybe I'm barking up the wrong tree, but the problem does bisect to a
simple conversion to percpu...

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