From: Serge Belyshev <33554432@mtu-net.ru>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
Date: 25 Jan 2004 07:46:21 +0300 [thread overview]
Message-ID: <87vfn063fm.fsf@mtu-net.ru> (raw)
Please comment on struct usb_kbd. Did I choose right place to get
'randomness' from?
diff -urN vanilla/drivers/usb/input/usbkbd.c hack/drivers/usb/input/usbkbd.c
--- vanilla/drivers/usb/input/usbkbd.c Sat Aug 23 19:34:14 2003
+++ hack/drivers/usb/input/usbkbd.c Tue Nov 11 23:15:54 2003
@@ -32,6 +32,7 @@
#include <linux/input.h>
#include <linux/init.h>
#include <linux/usb.h>
+#include <linux/random.h>
/*
* Version Information
@@ -125,6 +126,7 @@
memcpy(kbd->old, kbd->new, 8);
+ add_keyboard_randomness (kbd->new[0]);
resubmit:
i = usb_submit_urb (urb, SLAB_ATOMIC);
if (i)
diff -urN vanilla/drivers/usb/input/usbmouse.c hack/drivers/usb/input/usbmouse.c
--- vanilla/drivers/usb/input/usbmouse.c Sat Aug 23 19:34:14 2003
+++ hack/drivers/usb/input/usbmouse.c Tue Nov 11 23:16:04 2003
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/usb.h>
+#include <linux/random.h>
/*
* Version Information
@@ -89,6 +90,7 @@
input_report_rel(dev, REL_WHEEL, data[3]);
input_sync(dev);
+ add_mouse_randomness (*(u32 *) data);
resubmit:
status = usb_submit_urb (urb, SLAB_ATOMIC);
if (status)
next reply other threads:[~2004-01-25 4:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-25 4:46 Serge Belyshev [this message]
2004-01-25 7:29 ` [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c Andrew Morton
2004-01-25 10:08 ` Serge Belyshev
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=87vfn063fm.fsf@mtu-net.ru \
--to=33554432@mtu-net.ru \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox