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: <20140929120927.7e05f485@gandalf.local.home>
Date:	Mon, 29 Sep 2014 12:09:27 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Petr Mladek <pmladek@...e.cz>, LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] seq_file: Fix seq_putc() to be consistent with
 seq_puts()

On Mon, 29 Sep 2014 16:47:12 +0100
Al Viro <viro@...IV.linux.org.uk> wrote:

> What we need is a helper along the lines of seq_already_overflown() that
> could be used by the few places that really want that hint.  As in
> 	if (seq_already_overflown(m))
> 		return 0; // we'll be called again with bigger buffer anyway

We already have that, it's called seq_overflow(), but it's a static
function in seq_file.c. We can easily move that to seq_file.h. If you
want to rename it to seq_already_overflown() that would be fine.

> 
> And let's make seq_printf and friends return void.  Any breakage we miss
> on grep will be caught by compiler.  Enough is enough.

I'm good with this.

Note, I'm trying to make a seq_buf.c file that consolidates the code in
trace_seq.c and seq_file.c. This will extend slightly the use cases of
the seq_buf functions, but I think all the seq_*() functions from
seq_file.c can be turned into functions that return void.

I'm thinking of making m->count > m->size be what returns overflow as
true, as m->count == m->size can have all the data, that is, nothing
lost.

I'll start writing up some patches.

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