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: <1314026428.18461.10.camel@Joe-Laptop>
Date:	Mon, 22 Aug 2011 08:20:28 -0700
From:	Joe Perches <joe@...ches.com>
To:	Jean-Francois Moine <moinejf@...e.fr>
Cc:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/14] [media] gspca: Use current logging styles

On Mon, 2011-08-22 at 10:50 +0200, Jean-Francois Moine wrote:
> On Sun, 21 Aug 2011 15:56:57 -0700
> Joe Perches <joe@...ches.com> wrote:
> > Add pr_fmt.
> > Convert usb style logging macros to pr_<level>.
> > Remove now unused old usb style logging macros.
> Hi Joe,

Hello Jean-Francois.

> Sorry, but I do not see the advantages of your patch.

The primary current advantage is style standardization
both in code and dmesg output.

Future changes to printk.h will reduce object sizes
by centralizing the prefix to a singleton and
emitting it only in pr_<level>.

> For gspca, the source files are bigger, and the only visible change is
> the display of the real module name instead of the name defined by hand
> (this change may have been done just in gspca.h).

No, not really. gspca.h is not the first #include
for all sources.

Using #define pr_fmt before any #include avoids
possible redefinition of the pr_<level> prefix.

$ grep -rP --include=*.[ch] -l "gspca\.h" drivers/media | \
	xargs grep -m1 "#\s*include"

> Also, I think that defining 'pr_fmt' in each source file is not a good
> idea...

That's temporary for another year or so.
After changes to printk are introduced, all
of the uses of
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
could/should be removed.

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