![]() | |||||||||||||
Messages in this thread |
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 13:00 [W:0.142 / U:1.720 seconds] ©2003-2008 Jasper Spaans | |||||||||||||