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]
Message-Id: <200812181016.28184.david-b@pacbell.net>
Date:	Thu, 18 Dec 2008 10:16:27 -0800
From:	David Brownell <david-b@...bell.net>
To:	Jean Delvare <khali@...ux-fr.org>, Ben Dooks <ben-linux@...ff.org>
Cc:	linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org
Subject: Re: GPIO: Fix probe() error return in gpio driver probes

On Monday 15 December 2008, Jean Delvare wrote:
> 
> > > > I was thinking that -EINVAL is almost the least informative
> > > > diagnostic code possible, since so many places return it
> > > > that it's usually hard to find out *which* invalid parameter
> > > > triggered ...
> > > > 
> > > > Is there a less-overloaded code you could return?
> > > 
> > > -EINVAL sounds right to me, all that's really missing is dev_dbg()
> > > messages in the drivers to log what the exact problem was. 

Fair enough, though it just papers over how ambiguous -EINVAL is.


> > It might be more acceptable to be dev_err(), that way it will get
> > printed no matter what debug options have been selected. If so, a
> > seperate patch is probably in order to make the change.
> 
> As far as I can see, such errors would be caused by development-time
> mistakes, so dev_dbg() seems appropriate. dev_err() would make the
> binaries larger for all end-users.

Right, dev_dbg() is the way to go.  I'd ack a version of this patch
which pairs these -EINVAL changes with dev_dbg() messages to make
these problems less painful to track down.  dev_err() is much abused.

- Dave

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