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: <CAM2zO=BvgSeTiD16zVbb+3To418vkbZ3LEYzzsuZixZtEY-GSw@mail.gmail.com>
Date:	Wed, 27 Jul 2011 10:41:53 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	Heiko Carstens <heiko.carstens@...ibm.com>
Cc:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	kobayashi.kk@...s.nec.co.jp
Subject: Re: [PATCH] proc/softirqs: only show state for online cpus

On Wed, Jul 27, 2011 at 12:34 AM, Heiko Carstens
<heiko.carstens@...ibm.com> wrote:
> On Tue, Jul 26, 2011 at 03:29:43PM +0800, Yong Zhang wrote:
>> > Offtopic, /proc/interrupt should be protected by get_online_cpus().
>> > Otherwise the header (i.e. cpu number) and the actual statistics fields
>> > can be mismatched likes following. Am I missing something?
>>
>> I think you are right. The reader could be preempted by cpu hotplug.
>>
>> After searching the whole tree, only s390 take cpu_hotplug.lock,
>> but its usage is not currect:
>>
>> arch/s390/kernel/irq.c:
>> int show_interrupts(struct seq_file *p, void *v)
>> {
>>           get_online_cpus();
>>           .........
>>           put_online_cpus();
>> }
>>
>> Because the reader will call show_interrupts nr_irqs times.
>> So get_online_cpus()/put_online_cpus() should be put upper,
>> maybe interrupts_open(). How do you think about it?
>
> Indeed, it's broken. You're going to submit a patch?
>

Yeah, coming soon :)

Thanks,
Yong



-- 
Only stand for myself
--
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