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:	Thu, 7 Jun 2007 16:39:35 +0200
From:	"Jesper Juhl" <jesper.juhl@...il.com>
To:	"Jan Engelhardt" <jengelh@...putergmbh.de>
Cc:	"Andy Whitcroft" <apw@...dowen.org>,
	"Andrew Morton" <akpm@...l.org>,
	"Randy Dunlap" <rdunlap@...otime.net>,
	"Joel Schopp" <jschopp@...tin.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] update checkpatch.pl to version 0.03

On 07/06/07, Jan Engelhardt <jengelh@...putergmbh.de> wrote:
>
> On Jun 6 2007 11:05, Jesper Juhl wrote:
> >
> > - Source files should be 7bit ASCII
>
> Nah. Think of....
>
> MODULE_AUTHOR("J. Ørsted <jorsted@...bar.com>");
>
That's true. I wrote that comment shortly after reading
http://lkml.org/lkml/2007/6/4/448 , but you are right, 7bit ASCII can
be too limiting at times... Hmmm...

> > - Maybe warn about usage of float/double in source files?
>
> Generally yes, maybe, but see arch/i386/kernel/cpu/bugs.c,
> arch/i386/math-emu/. Generally there is nothing to it. I think the
> feature to allow the kernel to use [i387] FP without manually
> saving/restoring the FP stack has been added some time ago.
>
I know there are places where floats and doubles can be used safely,
but for those rare occasions wouldn't it make sense to have the script
warn and require the submitter to justify the use?  After all, the
general rule is to not use floating point in the kernel, so such a
patch is suspicious.

> > - 'return' is not a function, so warn about patches that think it is
> > and use 'return(expr);' (this one is tricky since 'return (expr);' can
> > be OK in some cases.
>
> Now, if we could detect superfluous parentheses and branches,
> that'd be cool ;-) there are too many if ((a < 5) || (b > 6)) around.
>
Yeah wouldn't it be cool :-)  It might require a bit too much perl
magic to actually implement something sane, but I just threw every
idea that came into my mind into the mail, assuming Andy could sort
out the ones that were a little too crazy ;)

-- 
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
-
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