* [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
@ 2004-01-25 4:46 Serge Belyshev
2004-01-25 7:29 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Serge Belyshev @ 2004-01-25 4:46 UTC (permalink / raw)
To: linux-kernel
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
2004-01-25 4:46 [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c Serge Belyshev
@ 2004-01-25 7:29 ` Andrew Morton
2004-01-25 10:08 ` Serge Belyshev
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2004-01-25 7:29 UTC (permalink / raw)
To: Serge Belyshev; +Cc: linux-kernel
Serge Belyshev <33554432@mtu-net.ru> wrote:
>
> Please comment on struct usb_kbd. Did I choose right place to get
> 'randomness' from?
>
> @@ -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)
This function already calls input_report_key(), which calls
add_mouse_randomness(). This change seems to be unneeded.
> 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)
Similarly, this function has just called input_report_event() several
times.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
2004-01-25 7:29 ` Andrew Morton
@ 2004-01-25 10:08 ` Serge Belyshev
0 siblings, 0 replies; 3+ messages in thread
From: Serge Belyshev @ 2004-01-25 10:08 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
This function already calls input_report_key(), which calls
add_mouse_randomness(). This change seems to be unneeded.
Ahhh, I forgot to do 'fgrep add_mouse_randomness -r /usr/src/linux'...
Sorry for inconvenience.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-25 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-25 4:46 [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c Serge Belyshev
2004-01-25 7:29 ` Andrew Morton
2004-01-25 10:08 ` Serge Belyshev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox