All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Colombo <marco@esi.it>
To: ultralinux@vger.kernel.org
Subject: RNDGETENTCNT ioctl
Date: Thu, 07 Feb 2002 18:09:47 +0000	[thread overview]
Message-ID: <marc-linux-ultrasparc-101310553528841@msgid-missing> (raw)

Hi, I'd like to read the entropy count via the RNDGETENTCNT
ioctl, as in the following code:

	int     rfd, res;
	int     avail_entropy;

	...
	rfd = open("/dev/random", O_RDONLY);
	...
	res = ioctl(rfd, RNDGETENTCNT, &avail_entropy);

this happens to work on ix86, but fails on sparc64, with EINVAL.
I think I've tracked this down to:

arch/sparc64/kernel/ioctl32.c

where RNDGETENTCNT isn't even mentioned. Is there a patch to add support
for these "big R" ioctls to ioctl32.c?  Can RNDGETENTCNT simply be 
added to the list of those that get passed to sys_ioctl() without any
32->64bit translation? (I'm sorry but I can only vaguely understand the
issues behind than, so if some hacking is needed, more than just adding
#includes and case RNDGETENTCNT:, I won't be able to do it myself)

I'm currently running RH 2.2.19-6.2.12 (sparc64) kernel, please flame me
if I need to switch to the latest vanilla 2.2.x before further reporting.

The HW is Ultra 1 145Mhz.

TIA,
.TM.


                 reply	other threads:[~2002-02-07 18:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ultrasparc-101310553528841@msgid-missing \
    --to=marco@esi.it \
    --cc=ultralinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.