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, 8 May 2007 15:52:53 -0700
From:	Greg KH <greg@...ah.com>
To:	J??rn Engel <joern@...ybastard.org>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...l.org>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Dave Kleikamp <shaggy@...ux.vnet.ibm.com>,
	David Chinner <dgc@....com>
Subject: Re: [PATCH 1/2] LogFS proper

On Tue, May 08, 2007 at 10:58:27PM +0200, J??rn Engel wrote:
> On Tue, 8 May 2007 22:15:18 +0300, Pekka Enberg wrote:
> > On 5/8/07, J??rn Engel <joern@...ybastard.org> wrote:
> > >> > +typedef __be16 be16;
> > >> > +typedef __be32 be32;
> > >> > +typedef __be64 be64;
> > >>
> > >> Why are those typedefs necessary ?
> > >
> > >Not strictly.  I tend to use the be* types fairly often in the code and
> > >simply grew weary of seeing the underscores.
> > >
> > >Any objections if I seperate out the userspace headers and keep the
> > >shorthands for kernel code only?
> > 
> > Not sure what you mean but I would prefer you drop the typedefs completely.
> 
> Basically I prefer be64 over __be64 for similar reasons that most people
> prefer u64 over __u64.  Others prefer uint64_t over both, but C99 hasn't
> defined beint64_t yet.

There is a difference between "u64" and "__u64", so don't confuse the
two, they are used for different things.

Same thing for your typedef above, you are confusing the usage of these
types of variables, please do not do that.

In short, if the variable is going to cross the userspace/kernelspace
boundry, use the "__" version, otherwise use the non-"--" version.

And please don't use uint64_t in the kernel, I don't want to see that
long flame-war again, read the archives for why those kinds of types
don't matter for us in the kernel tree.

So please drop all typedefs from your filesystem, you should not be
creating any new ones, that's the incorrect style guidelines.

thanks,

greg k-h
-
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