[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c


Serge Belyshev <33554432 _at_ 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 _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: References: