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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 30 May 2009 11:50:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	vvscore@...il.com
Subject: Re: [PATCH] 8250: Fix oops from setserial

On Sat, 30 May 2009 11:46:32 +0100 Alan Cox <alan@...rguk.ukuu.org.uk> wrote:

> > Sure, huge numbers of drivers use the cast.
> > 
> > But I've never seen past sinnings as being a reason to continue sinning. 
> > Doing new code the right way doesn't result in worse code, and reduces
> > the chances of someone copying and pasting the wrong way.
> 
> As I said please read the rest of the driver.

I'm not the reading-averse one here :(

> It would ridiculous to have
> one dereference done differently to the rest in several thousand lines of
> code.

Actually, it would be typical.  Many many drivers which originally did
something consistently wrong have, over time, grown to contain a mix of
right and wrong.  It's one of the costs of doing things wrong.

> It's not a new driver, it's simply pasting a line from one place to
> another to update a field.

You already said all this.

Look, it's a single silly line, but there's a non-trivial point here. 
It comes up quite regularly and I always encourage people to do things
the right way rather than matching the existing wrong code.  Because,
when you think about it, there's really no merit in having consistently
wrong code.  A mix of right and wrong is better than 100% wrong.

If it results in inconsistent-looking code then that's good.  It may
result in some drive-by developer noticing the inconsistency and fixing
everything up.

Have a think about it.
--
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