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: <alpine.DEB.1.10.0901141259510.15549@gandalf.stny.rr.com>
Date:	Wed, 14 Jan 2009 13:19:40 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
cc:	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ring_buffer: reset write when reserve buffer fail


Hi Lai,

Sorry for the late response, I've got a million things going on at once, 
and this needed more thought than a quick review.

On Mon, 12 Jan 2009, Lai Jiangshan wrote:

> 
> Impact: reset struct buffer_page.write when interrupt storm
> 
> if struct buffer_page.write is not reset, any succedent committing
> will corrupted ring_buffer:
> 
> static inline void
> rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
> {
> 	......
> 		cpu_buffer->commit_page->commit =
> 			cpu_buffer->commit_page->write;
> 	......
> }
> 
> 
> when "if (RB_WARN_ON(cpu_buffer, next_page == reader_page))", ring_buffer
> is disabled, but some reserved buffers may haven't been committed.
> we need reset struct buffer_page.write.

So what you are saying is, when we hit this anomaly, another cpu might be 
writing to the ring buffer, and will soon do a commit.

> 
> when "if (unlikely(next_page == cpu_buffer->commit_page))", ring_buffer
> is still available, we should not corrupt it.

OK, makes sense. I'll queue it up.

Thanks!

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