[PATCH v3] Add support for /dev/[u]random ioctls

Dmitry V. Levin ldv at altlinux.org
Mon Nov 5 23:30:48 UTC 2018


On Mon, Nov 05, 2018 at 05:29:00PM +0000, Rasmus Villemoes wrote:
> * random_ioctl.c: New file.
> * Makefile.am (strace_SOURCES): Add it.
> * defs.h (DECL_IOCTL): Add random.
> * ioctl.c (ioctl_decode): Add 'R' case.
> * xlat/random_ioctl_cmds.in: New file.
> * tests/ioctl_random.c: New file.
> * tests/.gitignore: Add ioctl_random.
> * tests/pure_executables.list: Likewise.
> * tests/gen_tests.in (ioctl_random): New entry.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
> v2:
> * Use proper helpers for printing int* and struct fields
> * Add printing of buffer contents for RNDADDENTROPY
> * Add tests
> 
> v3:
> * Fix whitespace issues (sorry)
> * Define RNDRESEEDCRNG in xlat/random_ioctl_cmds.in, use
>   unconditionally.
> * Fix copy-pasto (nbd_ioctl_cmds.h -> random_ioctl_cmds.h)

Applied, thanks!

I also inserted #include <linux/types.h> before #include <linux/random.h>
to fix build on old systems without linux commit v2.6.29-rc4~77^2~24.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20181106/0b458f3e/attachment.bin>


More information about the Strace-devel mailing list