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, 20 Feb 2007 15:05:53 +0200
From:	Artem Bityutskiy <dedekind@...radead.org>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Frank Haverkamp <haver@...t.ibm.com>,
	Josh Boyer <jwboyer@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH 05/44 take 2] [UBI] internal common header

On Mon, 2007-02-19 at 10:54 +0000, Christoph Hellwig wrote:
> On Sat, Feb 17, 2007 at 06:54:49PM +0200, Artem Bityutskiy wrote:
> > +#ifndef __UBI_UBI_H__
> > +#define __UBI_UBI_H__
> > +
> > +#include <linux/mtd/ubi.h>
> > +
> > +/* Version of this UBI implementation */
> > +#define UBI_VERSION 1
> We shouldn't have versions for inkernel interfaces.

What do you mean? It is internal version just for future help: if we
develop incompatible UBI2 the old UBI will reject the new images.

> > +/* UBI messages printk level */
> > +#define UBI_MSG_LEVEL  KERN_INFO
> > +#define UBI_WARN_LEVEL KERN_WARNING
> > +#define UBI_ERR_LEVEL  KERN_ERR
> 
> Please use the KERN_ macros directly.

Will be done, thanks.

> > +/* UBI error messages */
> > +#define ubi_err(fmt, ...)                                                   \
> > +	printk(UBI_ERR_LEVEL UBI_ERR_PREF " %s " fmt "\n", __FUNCTION__,    \
> > +	       ##__VA_ARGS__)
> 
> you should probably use dev_printk and the wrappers around it in most
> places.

I will look at it, thanks.

> > +extern int ubis_num;
> > +extern struct ubi_info *ubis[UBI_MAX_INSTANCES];
> 
> Having this kind of global information directly exposed is a very
> bad idea.  In general you only want to access it through more
> specific information and avoid allocating the global array at all.

I do not see what is the problem with this. Please, refine.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

-
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