Re: [PATCH, RFC] random: introduce getrandom(2) system call
From: Theodore Ts'o
Date: Sun Jul 20 2014 - 13:41:27 EST
On Sun, Jul 20, 2014 at 07:27:42PM +0200, Andreas Schwab wrote:
> Theodore Ts'o <tytso@xxxxxxx> writes:
>
> > ERRORS
> > EINVAL The buflen value was invalid.
>
> Also on unknown flags? Without that it would be impossible to probe for
> implemented flags.
We removed the cap on the buflen size (although if someone gives
something insanely large, it can get capped), so EINVAL will only
happen for unknown flags. I'll fix the suggested man page.
- Ted
P.S. The reason why OpenBSD had a very strong opinion about returning
EIO for buflen greater than 256 bytes was they really wanted to pound
it into application writers than if they were trying to fetch more
than 256 bytes, they were probably Doing Something Wrong, and they
decided EIO was less subtle that EINVAL....
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/