lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 16 Feb 2017 14:14:47 +0000
From:   Ian Abbott <abbotti@....co.uk>
To:     Cheah Kok Cheong <thrust73@...il.com>,
        hsweeten@...ionengravers.com, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] Staging: comedi: drivers: comedi_test: Add
 auto-configuration capability

On 16/02/17 14:05, Cheah Kok Cheong wrote:
> Currently this module needs to be manually configured by COMEDI
> userspace tool before the test waveform can be read by a COMEDI
> compatible application.
>
> This patch adds auto-configuration capability and makes it the default
> loading option. This is achieved by creating a device during init
> to stand in for a real hardware device. This allows comedi_auto_config()
> to perform auto-configuration. With this patch, the test waveform can
> be read by a COMEDI compatible application without needing manual
> configuration.
>
> Previous behaviour is still selectable via module loading parameter.
> Module loading without passing any parameter will default to
> auto-configuration with the same default waveform amplitude and
> period values. For auto-configuration, different amplitude and
> period values can be set via module loading parameters.
>
> Tested on Xubuntu 16.04 using Xoscope ver: 2.0 which is available
> in the Ubuntu repository. Xoscope is a COMEDI compatible digital
> oscilloscope application. For manual configuration, only module
> loading/unloading is tested.
>
> Here are the truncated dmesg output.
> [sudo modprobe comedi_test]
>
> comedi_test: 1000000 microvolt, 100000 microsecond waveform attached
> driver 'comedi_test' has successfully auto-configured 'comedi_test'.
>
> [sudo modprobe comedi_test amplitude=2500000 period=150000]
>
> comedi_test: 2500000 microvolt, 150000 microsecond waveform attached
> driver 'comedi_test' has successfully auto-configured 'comedi_test'.
>
> [sudo modprobe comedi_test noauto=1]
>
> comedi_test: module is from the staging directory, the quality is unknown,
> you have been warned.
>
> For those without an actual hardware, the comedi_test module
> is as close as one can get to test the COMEDI system.
> Having both auto and manual configuration capability will broaden
> the test function of this module.
> Hopefully this will make it easier for people to check out the
> COMEDI system and contribute to its development.
>
> Signed-off-by: Cheah Kok Cheong <thrust73@...il.com>
> ---
>
> V3:
> -Ensure struct class and struct device pointers are "NULL"
>  if auto-configuration fails - Ian
>
> V2:
> -Rename module param - Ian
> -Rename class - Ian
> -Tidy up init error handling - Ian
> -Allow module loading to continue when auto-configuration fails - Ian
> -Remove redundant "if" statement from module exit
> -Edit driver intro to reflect changes
>
>  drivers/staging/comedi/drivers/comedi_test.c | 135 ++++++++++++++++++++++++---
>  1 file changed, 123 insertions(+), 12 deletions(-)
>

It all seems to be in order now.  Thanks!

Reviewed-by: Ian Abbott <abbotti@....co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ