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]
Message-ID: <46384FAE.8030606@yahoo.com.au>
Date:	Wed, 02 May 2007 18:45:34 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Bhuvan Kumar MITTAL <bhuvan.mittal@...com>
CC:	'Alan Cox' <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org,
	'Daniel J Blueman' <daniel.blueman@...il.com>
Subject: Re: How to make mmap'ed kernel buffer non-cacheable

You can do down_interruptible to make the down interruptible.

Bhuvan Kumar MITTAL wrote:
> I'll rephrase the problem as follow:
> 
> I have a userthread which makes ioctl calls to the kernel and once it reaches inside the kernel it waits on a semaphore. It then does some work inside the kernel and continuously keeps looping between the kernel and user space in an endless while loop. 
> 
> I want to kill that thread from another user thread while the former is waiting on a semaphore in kernel (which it will never get) coz I want a clean exit of my driver. Please suggest me a way. I did try the use of pthread_cancel, but that is possible only if the target thread is executing in user space and making use of a pthread_testcancel call (with cancelability enabled ofcourse). 
> 
> Kindly suggest something. 
> 
> 
>>In continuation to this, I have another query:
>>As mentioned above, If there is a kernel task waiting on a semaphore (maybe even in hung state) and I wish to kill the kernel task from user space by making an ioctl call into the kernel, then how is it possible? Is it feasible at all?
> 
> 
> If the kernel task is hung because of some bug in your code, then it isn't
> really possible in general. You could always just "up" the semaphore and hope,
> but things might be corrupted.
> 
> If you just want to tell the kernel task to quit, I guess you'd just introduce
> some quit ioctl message, and have the kernel thread respond to that.
> 
> 
> 


-- 
SUSE Labs, Novell Inc.
-
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