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-next>] [day] [month] [year] [list]
Date:   Tue, 2 May 2017 16:03:34 +0200
From:   Miklos Szeredi <miklos@...redi.hu>
To:     linux-kernel@...r.kernel.org,
        Linux API <linux-api@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: error value for "internal error"

I've been wondering what to return for soft asserts like this:

        if (WARN_ON(something unexpected))
                return -E????;

EINVAL doesn't fit because it means the input from userspace was
wrong.  EIO means something went bad with the hardware.

There's no "software error" or "internal error" type return code.
Would it make sense to introduce one?

Rule would be to always add more detail to dmesg (such as done by
WARN_ON) when such a code is returned.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ