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: <1254763312.1799.507.camel@Joe-Laptop.home>
Date:	Mon, 05 Oct 2009 10:21:52 -0700
From:	Joe Perches <joe@...ches.com>
To:	rostedt@...dmis.org
Cc:	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH 02/21] ftrace.c: Add #define pr_fmt(fmt) KBUILD_MODNAME
 ": " fmt

On Mon, 2009-10-05 at 09:10 -0400, Steven Rostedt wrote:
> On Sun, 2009-10-04 at 17:53 -0700, Joe Perches wrote:
> > Remove prefixes from pr_<level>, use pr_fmt(fmt)
> > No change in output.
> What does KBUILD_MODNAME give us in the core code? This file does not
> belong to any module and is only compiled into the core kernel.

Hi Steven.

KBUILD_MODNAME is basename(__FILE__), or if multiple files are
grouped in the Makefile, then it's the basename(group)

http://lkml.indiana.edu/hypermail/linux/kernel/0210.2/0325.html

For ftrace.c, it gives "ftrace", which is the same
as the prefix you were using, so there's no change
in the output.

For other entries in say kernel/power, there were
messages that did not have prefixes

I believe these are some of the +/-'s of each approach:

Current:

o Allows some messages to not have a prefix at all
o Prefixes can vary inside a specific compilation unit

Proposed:

o Consistent, smaller source code, with no typos
  for instance: acpi/apic typos were found/fixed
                kernel/power had messages without PM:
                mce used "MCE: " and "mce: " prefixes
o Compatible with KMSG_COMPONENT
o All logging messages should have a prefix so
  it could be easier to grep/categorize logs
o Future:
  - Doesn't require each compilation unit to #define pr_fmt
  - Smaller objects without duplicated prefixes
  - Extensible via some dynamic_debug like mechanism
    to hide or show modname/__func__/offset without
    significant overhead or any increase in object size
    (printk would emit the prefix via some insertion
     mechanism after "<level>")

cheers, Joe

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