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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Oct 2008 14:21:50 +0530
From:	"Madhusudhan Chikkature" <madhu.cr@...com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	<gadiyar@...com>, <johnpol@....mipt.ru>,
	<linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>
Subject: Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430


----- Original Message ----- 
From: "Andrew Morton" <akpm@...ux-foundation.org>
To: "Madhusudhan Chikkature" <madhu.cr@...com>
Cc: <gadiyar@...com>; <johnpol@....mipt.ru>; <linux-kernel@...r.kernel.org>; <linux-omap@...r.kernel.org>
Sent: Monday, October 13, 2008 9:23 PM
Subject: Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430


>> On Mon, 13 Oct 2008 18:55:43 +0530 "Madhusudhan Chikkature" <madhu.cr@...com> wrote:
>> 
>> ----- Original Message ----- 
>> From: "Andrew Morton" <akpm@...ux-foundation.org>
>> To: "Gadiyar, Anand" <gadiyar@...com>
>> Cc: <johnpol@....mipt.ru>; <linux-kernel@...r.kernel.org>; <linux-omap@...r.kernel.org>; <madhu.cr@...com>
>> Sent: Saturday, October 11, 2008 2:08 AM
>> Subject: Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430
>> 
>> 
>> >> +       /* set the GO bit */
>> >> +       hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, OMAP_HDQ_CTRL_STATUS_GO,
>> >> +               OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO);
>> >> +       /* wait for the TXCOMPLETE bit */
>> >> +       ret = wait_event_interruptible_timeout(hdq_wait_queue,
>> >> +               hdq_data->hdq_irqstatus, OMAP_HDQ_TIMEOUT);
>> >> +       if (ret < 0) {
>> >> +               dev_dbg(hdq_data->dev, "wait interrupted");
>> >> +               return -EINTR;
>> >> +       }
>> > 
>> > Is this desirable?  The user hits ^C and the driver bails out?
>> > 
>> > I assume so, but was this tested?
>> 
>> Andrew, What is the test scenario you mean here? A user hitting ^C when the driver is waiting for the TXCOMPLETE bit?
> 
> Yes.
> 

Yes. It is desired to return an error if the condition in the wait is not met. I need to change the check for return value to check for zero and neg value.

I spent some time to test this perticular scenario.I could not really see any impact of hitting ^C when an application is 
transfering data in the background. When the h/w is programmed to transfer data and the driver issues a wait, I see that 
TXCOMPLETE interrupt comes immediately and wakes up as expected. 

So guess I am unable to hit ^C exactly when the driver is waiting in wait_event_interruptible_timeout(before the condition 
is met) for it to catch the signal. Is it generally suggested to use wait_event_timeout so that ^C signal is not caught?

Regards,
Madhu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ