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: <1239632019.21121.7.camel@localhost.localdomain>
Date:	Mon, 13 Apr 2009 10:13:39 -0400
From:	Steven Rostedt <srostedt@...hat.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] tracing: fix splice return too large


On Wed, 2009-04-08 at 11:55 +0200, Ingo Molnar wrote:
> * Lai Jiangshan <laijs@...fujitsu.com> wrote:
> 
> > Ingo Molnar wrote:
> > > * Lai Jiangshan <laijs@...fujitsu.com> wrote:
> > > 
> > >> -	for (i = 0; i < PIPE_BUFFERS && len; i++, len -= size) {
> > >> +	if (*ppos & (PAGE_SIZE - 1)) {
> > >> +		WARN_ONCE(1, "Ftrace: previous read must page-align\n");

Small English grammar nit,

  "Ftrace: previous read must be page-aligned"

> > >> +		return -EINVAL;
> > >> +	}
> > >> +
> > >> +	if (len & (PAGE_SIZE - 1)) {
> > >> +		WARN_ONCE(1, "Ftrace: splice_read should page-align\n");

  "Ftrace: splice_read should be page-aligned"

> > >> +		if (len < PAGE_SIZE)
> > >> +			return -EINVAL;
> > >> +		len &= PAGE_MASK;
> > >> +	}
> > > 
> > > Hm, the fix looks good, but is it a good idea to allow the 
> > > triggering of this message from user-space?
> > > 
> > 
> > But it is only triggered once.
> > 
> > If user get content from trace_pipe_raw with non-page-align, the 
> > content is garbage. It's wasting, the kernel disallows it. This 
> > message tell user why he read failed.
> > 
> > These 4 patches make trace_pipe_raw more robustious and consistent 
> > (read by read(2) and splice). I focus on handling raw ftrace data 
> > in userspace, these raw ftrace data should be trustiness.
> 
> Ok, agreed.
> 
> i've applied these four fixes from you to tip:tracing/splice, 
> thanks. Steve: i think they are tracing/urgent material - do you 
> agree?

Agreed. With my comments above:

Acked-by: Steven Rostedt <rostedt@...dmis.org>

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