From: Andrew Morton <akpm@osdl.org>
To: Serge Belyshev <33554432@mtu-net.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
Date: Sat, 24 Jan 2004 23:29:14 -0800 [thread overview]
Message-ID: <20040124232914.13a2beb7.akpm@osdl.org> (raw)
In-Reply-To: <87vfn063fm.fsf@mtu-net.ru>
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.
next prev parent reply other threads:[~2004-01-25 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-25 4:46 [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c Serge Belyshev
2004-01-25 7:29 ` Andrew Morton [this message]
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=20040124232914.13a2beb7.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=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 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.