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: <CAJfuBxyyiGYJ-DmtJG2fy0HDZ6BbpYpXwnA02uetS_0RRuh+0w@mail.gmail.com>
Date:	Fri, 26 Aug 2011 15:47:49 -0600
From:	Jim Cromie <jim.cromie@...il.com>
To:	Jason Baron <jbaron@...hat.com>
Cc:	gregkh@...e.de, joe@...ches.com, bvanassche@....org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] dynamic_debug: use a single printk() to emit msgs

On Thu, Aug 25, 2011 at 11:34 AM, Jason Baron <jbaron@...hat.com> wrote:

> +       if (desc->flags & _DPRINTK_FLAGS_INCL_MODNAME)
> +               pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->modname);
> +       if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
> +               pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->function);
> +       if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
> +               pos += snprintf(buf + pos, LEFT(pos), "%d ", desc->lineno);

this inserts a space after lineno, but not otherwize.

I have patch to fix it, but maybe you want to fix it it here ?

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 9c8e133..122246f 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -439,7 +439,9 @@ static char *dynamic_emit_prefix(const struct
_ddebug *desc, char *buf)
 	if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
 		pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->function);
 	if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
-		pos += snprintf(buf + pos, LEFT(pos), "%d ", desc->lineno);
+		pos += snprintf(buf + pos, LEFT(pos), "%d:", desc->lineno);
+	if (pos - strlen(KERN_DEBUG))
+		pos += snprintf(buf + pos, LEFT(pos), " ");

 	return buf;
 }
-- 
1.7.4.4


also attached.
If it doesnt apply, or you defer, I'll resend once Greg's accepted
your whole set.

View attachment "0003-dynamic_debug-add-space-at-end-of-non-null-dynamic-p.patch" of type "text/x-patch" (1177 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ