Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-20 Thread Daniel Vetter
On Fri, Jun 20, 2014 at 1:42 AM, Greg KH wrote: >> I'm actually concerned about this trend. Downgrading things to WARN_ON >> can allow a security bug in the kernel to continue to exist, for >> example, or make the error message disappear. > > A BUG_ON makes any error message disappear pretty quic

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-20 Thread Daniel Vetter
On Fri, Jun 20, 2014 at 12:39 AM, H. Peter Anvin wrote: >>> Aside: This is a pet peeve of mine and recently I've switched to >>> rejecting all patch that have a BUG_ON, period. >> >> Please do, I have been for a few years now as well for the same reasons >> you cite. >> > > I'm actually concerned

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Greg KH
On Thu, Jun 19, 2014 at 03:39:47PM -0700, H. Peter Anvin wrote: > On 06/19/2014 01:01 PM, Greg KH wrote: > > On Thu, Jun 19, 2014 at 09:15:36PM +0200, Daniel Vetter wrote: > >> On Thu, Jun 19, 2014 at 7:00 PM, Greg KH > >> wrote: > >> + BUG_ON(f1->context != f2->context); > > > >

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Rob Clark
On Thu, Jun 19, 2014 at 5:50 PM, Dave Airlie wrote: > On 20 June 2014 04:19, Greg KH wrote: >> On Thu, Jun 19, 2014 at 01:45:30PM -0400, Rob Clark wrote: >>> On Thu, Jun 19, 2014 at 1:00 PM, Greg KH wrote: >>> > On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: >>> >> On Wed, Jun 18, 20

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread James Bottomley
On Thu, 2014-06-19 at 15:39 -0700, H. Peter Anvin wrote: > On 06/19/2014 01:01 PM, Greg KH wrote: > > On Thu, Jun 19, 2014 at 09:15:36PM +0200, Daniel Vetter wrote: > >> On Thu, Jun 19, 2014 at 7:00 PM, Greg KH > >> wrote: > >> + BUG_ON(f1->context != f2->context); > > > > Nice, y

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread H. Peter Anvin
On 06/19/2014 01:01 PM, Greg KH wrote: > On Thu, Jun 19, 2014 at 09:15:36PM +0200, Daniel Vetter wrote: >> On Thu, Jun 19, 2014 at 7:00 PM, Greg KH wrote: >> + BUG_ON(f1->context != f2->context); > > Nice, you just crashed the kernel, making it impossible to debug or > recover

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Dave Airlie
On 20 June 2014 04:19, Greg KH wrote: > On Thu, Jun 19, 2014 at 01:45:30PM -0400, Rob Clark wrote: >> On Thu, Jun 19, 2014 at 1:00 PM, Greg KH wrote: >> > On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: >> >> On Wed, Jun 18, 2014 at 9:13 PM, Greg KH >> >> wrote: >> >> > On Wed, Jun 1

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Greg KH
On Thu, Jun 19, 2014 at 09:15:36PM +0200, Daniel Vetter wrote: > On Thu, Jun 19, 2014 at 7:00 PM, Greg KH wrote: > >> >> + BUG_ON(f1->context != f2->context); > >> > > >> > Nice, you just crashed the kernel, making it impossible to debug or > >> > recover :( > >> > >> agreed, that should proba

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Daniel Vetter
On Thu, Jun 19, 2014 at 8:19 PM, Greg KH wrote: >> >> > EXPORT_SYMBOL_GPL()? Same goes for all of the exports in here. >> >> > Traditionally all of the driver core exports have been with this >> >> > marking, any objection to making that change here as well? >> >> >> >> tbh, I prefer EXPORT_SYMBO

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Daniel Vetter
On Thu, Jun 19, 2014 at 7:00 PM, Greg KH wrote: >> >> + BUG_ON(f1->context != f2->context); >> > >> > Nice, you just crashed the kernel, making it impossible to debug or >> > recover :( >> >> agreed, that should probably be 'if (WARN_ON(...)) return NULL;' >> >> (but at least I wouldn't expect

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Rob Clark
On Thu, Jun 19, 2014 at 2:19 PM, Greg KH wrote: > On Thu, Jun 19, 2014 at 01:45:30PM -0400, Rob Clark wrote: >> On Thu, Jun 19, 2014 at 1:00 PM, Greg KH wrote: >> > On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: >> >> On Wed, Jun 18, 2014 at 9:13 PM, Greg KH >> >> wrote: >> >> > On

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread James Bottomley
On Thu, 2014-06-19 at 11:19 -0700, Greg KH wrote: > On Thu, Jun 19, 2014 at 01:45:30PM -0400, Rob Clark wrote: > > On Thu, Jun 19, 2014 at 1:00 PM, Greg KH wrote: > > > On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: > > >> On Wed, Jun 18, 2014 at 9:13 PM, Greg KH > > >> wrote: > > >>

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Greg KH
On Thu, Jun 19, 2014 at 01:45:30PM -0400, Rob Clark wrote: > On Thu, Jun 19, 2014 at 1:00 PM, Greg KH wrote: > > On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: > >> On Wed, Jun 18, 2014 at 9:13 PM, Greg KH > >> wrote: > >> > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Rob Clark
On Thu, Jun 19, 2014 at 1:00 PM, Greg KH wrote: > On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: >> On Wed, Jun 18, 2014 at 9:13 PM, Greg KH wrote: >> > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: >> >> +#define CREATE_TRACE_POINTS >> >> +#include >> >> + >> >>

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Greg KH
On Thu, Jun 19, 2014 at 10:00:18AM -0400, Rob Clark wrote: > On Wed, Jun 18, 2014 at 9:13 PM, Greg KH wrote: > > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: > >> +#define CREATE_TRACE_POINTS > >> +#include > >> + > >> +EXPORT_TRACEPOINT_SYMBOL(fence_annotate_wait_on); > >>

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-19 Thread Rob Clark
On Wed, Jun 18, 2014 at 9:13 PM, Greg KH wrote: > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: >> +#define CREATE_TRACE_POINTS >> +#include >> + >> +EXPORT_TRACEPOINT_SYMBOL(fence_annotate_wait_on); >> +EXPORT_TRACEPOINT_SYMBOL(fence_emit); > > Are you really willing to live

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Sumit Semwal
On 19 June 2014 10:24, Greg KH wrote: > On Thu, Jun 19, 2014 at 09:57:35AM +0530, Sumit Semwal wrote: >> Hi Greg, >> >> >> >> >> Who is going to sign up to maintain this code? (hint, it's not me...) >> > >> > that would be Sumit (dma-buf tree).. >> > >> > probably we should move fence/reservatio

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Greg KH
On Thu, Jun 19, 2014 at 09:57:35AM +0530, Sumit Semwal wrote: > Hi Greg, > > On 19 June 2014 06:55, Rob Clark wrote: > > On Wed, Jun 18, 2014 at 9:16 PM, Greg KH wrote: > >> On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: > >>> A fence can be attached to a buffer which is bein

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Sumit Semwal
Hi Greg, On 19 June 2014 06:55, Rob Clark wrote: > On Wed, Jun 18, 2014 at 9:16 PM, Greg KH wrote: >> On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: >>> A fence can be attached to a buffer which is being filled or consumed >>> by hw, to allow userspace to pass the buffer with

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Greg KH
On Wed, Jun 18, 2014 at 09:23:06PM -0400, Rob Clark wrote: > On Wed, Jun 18, 2014 at 9:13 PM, Greg KH wrote: > > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: > >> +#define CREATE_TRACE_POINTS > >> +#include > >> + > >> +EXPORT_TRACEPOINT_SYMBOL(fence_annotate_wait_on); > >>

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Rob Clark
On Wed, Jun 18, 2014 at 9:16 PM, Greg KH wrote: > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: >> A fence can be attached to a buffer which is being filled or consumed >> by hw, to allow userspace to pass the buffer without waiting to another >> device. For example, userspac

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Rob Clark
On Wed, Jun 18, 2014 at 9:13 PM, Greg KH wrote: > On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: >> +#define CREATE_TRACE_POINTS >> +#include >> + >> +EXPORT_TRACEPOINT_SYMBOL(fence_annotate_wait_on); >> +EXPORT_TRACEPOINT_SYMBOL(fence_emit); > > Are you really willing to live

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Greg KH
On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: > A fence can be attached to a buffer which is being filled or consumed > by hw, to allow userspace to pass the buffer without waiting to another > device. For example, userspace can call page_flip ioctl to display the > next frame

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Greg KH
On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: > + * This program is distributed in the hope that it will be useful, but > WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lic

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Greg KH
On Wed, Jun 18, 2014 at 12:36:54PM +0200, Maarten Lankhorst wrote: > +#define CREATE_TRACE_POINTS > +#include > + > +EXPORT_TRACEPOINT_SYMBOL(fence_annotate_wait_on); > +EXPORT_TRACEPOINT_SYMBOL(fence_emit); Are you really willing to live with these as tracepoints for forever? What is the use of

[REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Maarten Lankhorst
A fence can be attached to a buffer which is being filled or consumed by hw, to allow userspace to pass the buffer without waiting to another device. For example, userspace can call page_flip ioctl to display the next frame of graphics after kicking the GPU but while the GPU is still rendering. T