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: <1275617591.15884.67.camel@gandalf.stny.rr.com>
Date:	Thu, 03 Jun 2010 22:13:11 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Kei Tokunaga <tokunaga.keiich@...fujitsu.com>,
	James Bottomley <James.Bottomley@...e.de>,
	Tomohiro Kusumi <kusumi.tomohiro@...fujitsu.com>,
	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Subject: Re: [PATCH][GIT PULL][v2.6.35] tracing/events: Convert format
 output to seq_file

On Fri, 2010-06-04 at 10:11 +0800, Li Zefan wrote:
> > +static void *f_start(struct seq_file *m, loff_t *pos)
> > +{
> > +	loff_t l = 1;
> > +	void *p;
> > +
> > +	/* Start by showing the header */
> > +	if (!*pos) {
> > +		(*pos)++;
> 
> We shoudn't increment *pos in start() handler. It's a common mistake when
> using seqfile. 

And a common mistake I do :-p

I'll rebase it with the fix.

> 
> What we need to do in start() is move the pointer to postion *pos.

So the rest is OK then? All that is needed is the removal of *pos++ ?

Thanks,

-- Steve

> 
> > +		return (void *)FORMAT_HEADER;
> >  	}
> >  
> > -	if (r)
> > -		r = trace_seq_printf(s, "\nprint fmt: %s\n",
> > -				call->print_fmt);
> > +	p = (void *)FORMAT_HEADER;
> > +	do {
> > +		p = f_next(m, p, &l);
> > +	} while (p && l < *pos);
> >  
> > -	if (!r) {
> > -		/*
> > -		 * ug!  The format output is bigger than a PAGE!!
> > -		 */
> > -		buf = "FORMAT TOO BIG\n";
> > -		r = simple_read_from_buffer(ubuf, cnt, ppos,
> > -					      buf, strlen(buf));
> > -		goto out;
> > +	return p;
> > +}


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