All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: Fix get_property logic fumble
@ 2017-04-10 11:54 Daniel Vetter
  2017-04-10 12:14 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Daniel Vetter @ 2017-04-10 11:54 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

Yet again I've proven that I can't negate conditions :(

Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index 3feef0659940..3e88fa24eab3 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -476,7 +476,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
 	    drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
 		list_for_each_entry(prop_enum, &property->enum_list, head) {
 			enum_count++;
-			if (out_resp->count_enum_blobs <= enum_count)
+			if (out_resp->count_enum_blobs < enum_count)
 				continue;
 
 			if (copy_to_user(&enum_ptr[copied].value,
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✓ Fi.CI.BAT: success for drm: Fix get_property logic fumble
  2017-04-10 11:54 [PATCH] drm: Fix get_property logic fumble Daniel Vetter
@ 2017-04-10 12:14 ` Patchwork
  2017-04-10 12:37 ` [Intel-gfx] [PATCH] " Chris Wilson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-04-10 12:14 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: drm: Fix get_property logic fumble
URL   : https://patchwork.freedesktop.org/series/22772/
State : success

== Summary ==

Series 22772v1 drm: Fix get_property logic fumble
https://patchwork.freedesktop.org/api/1.0/series/22772/revisions/1/mbox/

Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                fail       -> PASS       (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                pass       -> DMESG-WARN (fi-bxt-t5700) fdo#100125
                pass       -> DMESG-WARN (fi-kbl-7560u) fdo#100125

fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:435s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:428s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:577s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:508s
fi-bxt-t5700     total:278  pass:257  dwarn:1   dfail:0   fail:0   skip:20  time:551s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:480s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:475s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:418s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:402s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:424s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:491s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:467s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:452s
fi-kbl-7560u     total:278  pass:267  dwarn:1   dfail:0   fail:0   skip:10  time:570s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:452s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time:571s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:474s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:496s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:433s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:530s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time:398s

02f6d3e01f3e1b6b91efeaceabd24e36e0540b49 drm-tip: 2017y-04m-10d-11h-06m-04s UTC integration manifest
a7d1fee drm: Fix get_property logic fumble

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4458/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Intel-gfx] [PATCH] drm: Fix get_property logic fumble
  2017-04-10 11:54 [PATCH] drm: Fix get_property logic fumble Daniel Vetter
  2017-04-10 12:14 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-04-10 12:37 ` Chris Wilson
  2017-04-12 15:18   ` Daniel Vetter
  2017-04-10 12:40 ` Maarten Lankhorst
  2017-04-10 17:16 ` Sean Paul
  3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2017-04-10 12:37 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Mon, Apr 10, 2017 at 01:54:45PM +0200, Daniel Vetter wrote:
> Yet again I've proven that I can't negate conditions :(
> 
> Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl")

You also get to write the igt/kms_getproperty, starting with a 
	memset(prop_values, 0xc5, foo);
	drmIoctl(GETPROPERTY);
	igt_assert(!memchr(prop_values, 0xc5, bar));
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm: Fix get_property logic fumble
  2017-04-10 11:54 [PATCH] drm: Fix get_property logic fumble Daniel Vetter
  2017-04-10 12:14 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-04-10 12:37 ` [Intel-gfx] [PATCH] " Chris Wilson
@ 2017-04-10 12:40 ` Maarten Lankhorst
  2017-04-13 20:44   ` Andres Rodriguez
  2017-04-10 17:16 ` Sean Paul
  3 siblings, 1 reply; 7+ messages in thread
From: Maarten Lankhorst @ 2017-04-10 12:40 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics Development; +Cc: Daniel Vetter, DRI Development

Op 10-04-17 om 13:54 schreef Daniel Vetter:
> Yet again I've proven that I can't negate conditions :(
>
> Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl")
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
> index 3feef0659940..3e88fa24eab3 100644
> --- a/drivers/gpu/drm/drm_property.c
> +++ b/drivers/gpu/drm/drm_property.c
> @@ -476,7 +476,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
>  	    drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
>  		list_for_each_entry(prop_enum, &property->enum_list, head) {
>  			enum_count++;
> -			if (out_resp->count_enum_blobs <= enum_count)
> +			if (out_resp->count_enum_blobs < enum_count)
>  				continue;
>  
>  			if (copy_to_user(&enum_ptr[copied].value,

Neither can I, glanced over it while looking why the bisect pointed at this commit.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm: Fix get_property logic fumble
  2017-04-10 11:54 [PATCH] drm: Fix get_property logic fumble Daniel Vetter
                   ` (2 preceding siblings ...)
  2017-04-10 12:40 ` Maarten Lankhorst
@ 2017-04-10 17:16 ` Sean Paul
  3 siblings, 0 replies; 7+ messages in thread
From: Sean Paul @ 2017-04-10 17:16 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development, DRI Development, Daniel Vetter

On Mon, Apr 10, 2017 at 01:54:45PM +0200, Daniel Vetter wrote:
> Yet again I've proven that I can't negate conditions :(
> 
> Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl")
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
> index 3feef0659940..3e88fa24eab3 100644
> --- a/drivers/gpu/drm/drm_property.c
> +++ b/drivers/gpu/drm/drm_property.c
> @@ -476,7 +476,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
>  	    drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
>  		list_for_each_entry(prop_enum, &property->enum_list, head) {
>  			enum_count++;
> -			if (out_resp->count_enum_blobs <= enum_count)
> +			if (out_resp->count_enum_blobs < enum_count)
>  				continue;
>  
>  			if (copy_to_user(&enum_ptr[copied].value,
> -- 
> 2.11.0

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Intel-gfx] [PATCH] drm: Fix get_property logic fumble
  2017-04-10 12:37 ` [Intel-gfx] [PATCH] " Chris Wilson
@ 2017-04-12 15:18   ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2017-04-12 15:18 UTC (permalink / raw)
  To: Chris Wilson, Daniel Vetter, Intel Graphics Development,
	DRI Development, Daniel Vetter

On Mon, Apr 10, 2017 at 01:37:01PM +0100, Chris Wilson wrote:
> On Mon, Apr 10, 2017 at 01:54:45PM +0200, Daniel Vetter wrote:
> > Yet again I've proven that I can't negate conditions :(
> > 
> > Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl")
> 
> You also get to write the igt/kms_getproperty, starting with a 
> 	memset(prop_values, 0xc5, foo);
> 	drmIoctl(GETPROPERTY);
> 	igt_assert(!memchr(prop_values, 0xc5, bar));

Testcase: igt/kms_properties/get_property-sanity

Thanks for reminding me to not be lazy with testing stuff we've broken!

Pushed the patch to -next-fixes.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm: Fix get_property logic fumble
  2017-04-10 12:40 ` Maarten Lankhorst
@ 2017-04-13 20:44   ` Andres Rodriguez
  0 siblings, 0 replies; 7+ messages in thread
From: Andres Rodriguez @ 2017-04-13 20:44 UTC (permalink / raw)
  To: dri-devel



On 2017-04-10 08:40 AM, Maarten Lankhorst wrote:
> Op 10-04-17 om 13:54 schreef Daniel Vetter:
>> Yet again I've proven that I can't negate conditions :(
>>
>> Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl")
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Daniel Vetter <daniel.vetter@intel.com>
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> Cc: Sean Paul <seanpaul@chromium.org>
>> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> ---
>>  drivers/gpu/drm/drm_property.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
>> index 3feef0659940..3e88fa24eab3 100644
>> --- a/drivers/gpu/drm/drm_property.c
>> +++ b/drivers/gpu/drm/drm_property.c
>> @@ -476,7 +476,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
>>  	    drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
>>  		list_for_each_entry(prop_enum, &property->enum_list, head) {
>>  			enum_count++;
>> -			if (out_resp->count_enum_blobs <= enum_count)
>> +			if (out_resp->count_enum_blobs < enum_count)
>>  				continue;
>>
>>  			if (copy_to_user(&enum_ptr[copied].value,
>
> Neither can I, glanced over it while looking why the bisect pointed at this commit.

Same.

Tested-by: Andres Rodriguez <andresx7@gmail.com>

Fixes segfaults on xorg-video-amdgpu-1.1.2

>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-13 20:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 11:54 [PATCH] drm: Fix get_property logic fumble Daniel Vetter
2017-04-10 12:14 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-04-10 12:37 ` [Intel-gfx] [PATCH] " Chris Wilson
2017-04-12 15:18   ` Daniel Vetter
2017-04-10 12:40 ` Maarten Lankhorst
2017-04-13 20:44   ` Andres Rodriguez
2017-04-10 17:16 ` Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.