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:	Mon, 06 Jul 2015 19:09:00 +0200
From:	Eric Auger <eric.auger@...aro.org>
To:	Paolo Bonzini <pbonzini@...hat.com>, eric.auger@...com,
	linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
	kvm@...r.kernel.org, christoffer.dall@...aro.org,
	marc.zyngier@....com, alex.williamson@...hat.com,
	avi.kivity@...il.com, mtosatti@...hat.com, feng.wu@...el.com,
	joro@...tes.org, b.reynal@...tualopensystems.com
CC:	linux-kernel@...r.kernel.org, patches@...aro.org
Subject: Re: [RFC v2 3/6] irq: bypass: Extend skeleton for ARM forwarding
 control

On 07/06/2015 05:57 PM, Paolo Bonzini wrote:
> 
> 
> On 06/07/2015 17:35, Eric Auger wrote:
>>>> diff --git a/kernel/irq/bypass.c b/kernel/irq/bypass.c
>>>>>> index 5d0f92b..efadbe5 100644
>>>>>> --- a/kernel/irq/bypass.c
>>>>>> +++ b/kernel/irq/bypass.c
>>>>>> @@ -19,6 +19,42 @@ static LIST_HEAD(producers);
>>>>>>  static LIST_HEAD(consumers);
>>>>>>  static DEFINE_MUTEX(lock);
>>>>>>  
>>>>>> +/* lock must be hold when calling connect */
>>>>
>>>> If a lock must be held while callbacks are called, you have to document
>>>> that producers and consumers must _not_ call back into the IRQ bypass
>>>> manager.  (If they have to, you have to document explicitly "This
>>>> function can be called from producer and consumer callbacks" whenever
>>>> relevant).
>> OK Thanks
> 
> Also, please document on functions that take the irq bypass mutex that
> they can sleep.  In fact irq_bypass_{,un}register_{producer,consumer}
> need kerneldoc comments.
> 
> The good thing is that this helps a bit forming a lock hierarchy across
> the subsystems, for example irq bypass mutex outside vfio_platform_irq
> spinlock, because you cannot have a spinlock inside the mutex.  I think
> that all of your six callbacks are fine.

arghh, no that's wrong then. I have plenty of them in the KVM/arm vgic
part :-(

Eric
> 
> Paolo
> 

--
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