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

From: Andrew Morton (akpm_at_osdl.org)
Date: 01/25/04

  • Next message: Andrew Walrond: "Re: Fried the onboard Broadcom 4401 network..."
    Date:	Sat, 24 Jan 2004 23:29:14 -0800
    To: Serge Belyshev <33554432@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.

    -
    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/


  • Next message: Andrew Walrond: "Re: Fried the onboard Broadcom 4401 network..."

    Relevant Pages