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]
Date:	Tue, 14 Oct 2014 18:07:11 +0300
From:	Artem Bityutskiy <dedekind1@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Tanya Brokhman <tlinder@...eaurora.org>,
	ezequiel.garcia@...e-electrons.com, linux-mtd@...ts.infradead.org,
	linux-arm-msm@...r.kernel.org,
	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	Richard Weinberger <richard@....at>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging
 capabilities

On Tue, 2014-10-14 at 07:33 -0700, Joe Perches wrote:
> If you are going to change all the ubi_<level> calls,
> can you also please add a terminating newline to all
> the uses for consistency with all the other
> pr_<level>/dev_<level>/<etc>_<level> calls?

I get the consistency argument.

On the other hand, this is about printing a single line. It is gets
prefixed (with "UBI: ") automatically, why wouldn't we append the
newline character automatically too?

In the generic functions this is for flexibility: rarely, people to want
to print a multi-line message with those. The first line will be
prefixed, the following line won't be prefixed.

We do not need that flexibility. And I think that adding hundreds of
'\n's just for the sake of consistency to be not very attractive option.

IOW, I do not support this suggestion.

> > >   /* UBI error messages */
> > > -#define ubi_err(fmt, ...) pr_err("UBI error: %s: " fmt "\n",      \
> > > -				 __func__, ##__VA_ARGS__)
> > > +#define ubi_err(ubi, fmt, ...) pr_err("UBI-%d error: %s: " fmt "\n",      \
> > > +				 ubi->ubi_num, __func__, ##__VA_ARGS__)
> 
> Converting these macros to functions using "%pV"
> will save quite a bit of text space by removing
> a lot of "UBI-%d <foo>: " duplication.

These were added before '%pV' existed, I think. I never used this printk
extension, but if it results in a more concise code, sounds like a good
idea. But I'd do this separately.

> Using ubi_notice instead of ubi_msg would be a
> lot more standard too.

Yes, this could be an OK separate nicification, I think, if someone is
willing to do this work. I would not put this item to my TODO list,
since this is a lot of changes for with little gain. But I would accept
such a patch, sure.

Thanks!

--
Artem.

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