Re: [Suggestion] drivers/usb/host/uhci* : sprintf, need check len when use buf

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

 



On Wed, 19 Dec 2012, Chen Gang wrote:

> Hello Alan Stern
> 
>   I finished constructing envrionments.
>     let uhci-debug.c has effect (#define DEBUG, debug = 3 in drivers/usb/host/uhci-hcd.c)
>     build kernel and install, and restart machine.
>     can cat /sys/kernel/debug/usb/uhci/* to get full display contents
> 
>   for fixing this issue of uhci-debug.c,
> 
>   design:
>     A) I will let all are according to usb_device_dump in drivers/usb/core/devices.c
>        it has effect for all sub call functions (uhci_show_td, uhci_show_urbp...).
>          for originally, length judging of uhci_show_urbp seems need improvement.
>            it needs line >= 200 (line 104)
>            it call uhci_show_td in a loop (line 132..144)
>            uhci_show_td nees line >= 160 !
>          so I prefer to touch all sub functions.
>        if you have another suggestions, please tell me.
> 
>     B) I will not touch "original looping within 10 times" (if > 10 will be skipped)
>        in function uhci_show_urbp line 132..148
>        in function uhci_show_qh line 213..222
>        in function uhci_sprint_schedule
>           line 460..470, 
>           for nframes line 381..433.
>        if you think it is necessary to remove them, please tell me.
> 
>   test:
>     A) let MAX_OUTPUT as various values:
>        one value is enough for use, then can get full contents.
>        test 3 various values which small enough to let output truncate in various location.
>     B) check the result:
>        I will cat the contents from the /sys/kernel/debug/usb/uhci/*
>        use wc -c to get the count of output contents, then judge whether match the MAX_OUTPUT.
>     if you have additional completions, please tell me.
> 
> 
>   I will start the implementation when get your reply.

Your plan sounds okay to me.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux