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
| ||
|
Date: Sun, 22 Sep 2013 10:16:36 +0200 From: Geert Uytterhoeven <geert@...ux-m68k.org> To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp> Cc: Kees Cook <keescook@...omium.org>, Jiri Slaby <jslaby@...e.cz>, Al Viro <viro@...iv.linux.org.uk>, xemul@...nvz.org, remi.denis-courmont@...ia.com, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, linux-sctp@...r.kernel.org, George Spelvin <linux@...izon.com>, Andrew Morton <akpm@...ux-foundation.org>, Dan Carpenter <dan.carpenter@...cle.com>, Jan Beulich <JBeulich@...e.com>, Joe Perches <joe@...ches.com>, Motohiro KOSAKI <kosaki.motohiro@...il.com> Subject: Re: [PATCH 1/2] remove all uses of printf's %n On Sat, Sep 21, 2013 at 2:28 AM, Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp> wrote: > Kees Cook wrote: >> >> - seq_printf(seq, "%*s\n", 127 - len, ""); >> >> + seq_pad(seq, '\n'); >> > >> > Hmm, seq_pad is unintuitive. I would say it pads the string by '\n'. Of >> > course it does not, but... >> >> I don't think this is a very serious problem. Currently, the padding >> character is always ' ' for all existing callers, so it only makes >> sense to make the trailing character an argument. > > If you want, we can rename seq_pad() to seq_pad_and_putc(). Also we can pass > both the padding character (e.g. ' ') and the trailing character (e.g. '\n') > like seq_pad_and_putc((' ' << 8) | '\n'), though I wonder someone wants to > use '\0', '\t', '\n' etc. as the padding character... Not those special characters. '-' could be useful for tables (doh, text-mode graphics log output). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists