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: <20130515160532.c965e92707c354100e25f79b@linux-foundation.org>
Date:	Wed, 15 May 2013 16:05:32 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Oskar Andero <oskar.andero@...ymobile.com>
Cc:	<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
	Hugh Dickins <hughd@...gle.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Radovan Lekanovic <radovan.lekanovic@...ymobile.com>,
	David Rientjes <rientjes@...gle.com>
Subject: Re: [RFC PATCH 0/2] return value from shrinkers

On Mon, 13 May 2013 16:16:33 +0200 Oskar Andero <oskar.andero@...ymobile.com> wrote:

> In a previous discussion on lkml it was noted that the shrinkers use the
> magic value "-1" to signal that something went wrong.
> 
> This patch-set implements the suggestion of instead using errno.h values
> to return something more meaningful.
> 
> The first patch simply changes the check from -1 to any negative value and
> updates the comment accordingly.
> 
> The second patch updates the shrinkers to return an errno.h value instead
> of -1. Since this one spans over many different areas I need input on what is
> a meaningful return value. Right now I used -EBUSY on everything for consitency.
> 
> What do you say? Is this a good idea or does it make no sense at all?

I don't see much point in it, really.  Returning an errno implies that
the errno will eventually be returned to userspace.  But that isn't the
case, so such a change is somewhat misleading.

If we want the capability to return more than a binary yes/no message
to callers then yes, we could/should enumerate the shrinker return
values.  But as that is a different concept from errnos, it should be
done with a different and shrinker-specific namespace.


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