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:	Wed, 14 Aug 2013 11:36:06 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Xiaolong Ye <yexl@...vell.com>
Cc:	hjk@...sjkoch.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Add uio_sync_event interface to support mulit-instances
 case in UIO framework

On Wed, Aug 14, 2013 at 08:30:22PM +0800, Xiaolong Ye wrote:
> Hi, guys,
> 
> Recently, we have met fake interrupt issue when using UIO as our vpu
> driver in mulit-instances case, the issue can be described as below:

Do you have a pointer to this driver?

> In multi-instances case, we use vpu_lock(semaphore) to implement the mutually exclusive access to the
> device, each instace open uio device once and will be associated with a fd and its own uio_listener,
> we use poll to wait for the hardware interrupt. So let's assume that there are two instances, A and B,
> their uio_listener->event_count and idev->event are all 0 at the beginning, then A get the vpu_lock and start
> to work, it will block at poll()(because listener->event_count == idev->count) until H/W interrupt happens
> (atomic_inc(&idev->event)), after it releases vpu_lock, B will get the lock and start to work, however,
> its poll will return immediately because B's uio_listener->event_count is 0 while idev->event has been 1,
> that's how the fake interrupt happens.

Why not have just one instance talking to the hardware and then do the
locking in userspace for who ever needs to access the device?

thanks,

greg k-h
--
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