Skip to contentSkip to conversation

lib/i915: Fix pointer cast build issue

PATCH In review Tvrtko Ursulin 4 participants 5 messages May 22, 2019 – May 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/i915: Fix pointer cast build issue

From: Tvrtko Ursulin <[email protected]>

Use from_user_pointer when casting __u64 to a pointer.

---
 lib/i915/gem_engine_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/i915/gem_engine_topology.c +1 -1
index dd26fae00853..7ca3616687b9 100644
@@ -81,7 +81,7 @@ static void ctx_map_engines(int fd, struct intel_engine_data *ed,
 			    struct drm_i915_gem_context_param *param)
 {
 	struct i915_context_param_engines *engines =
-			(struct i915_context_param_engines *) param->value;
+			from_user_pointer(param->value);
 	int i = 0;
 
 	for (typeof(engines->engines[0]) *p =
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/1
#1 lore raw

Quoting Tvrtko Ursulin (2019-05-22 16:04:13)

Quoted 15 lines

From: Tvrtko Ursulin <[email protected]>

Use from_user_pointer when casting __u64 to a pointer.

---
 lib/i915/gem_engine_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/i915/gem_engine_topology.c +0 -0
index dd26fae00853..7ca3616687b9 100644

lib/i915/gem_engine_topology.c static void ctx_map_engines(int fd, struct intel_engine_data *ed, · line 84

Quoted 5 lines
lib/i915/gem_engine_topology.c +1 -1
@@ -81,7 +81,7 @@ static void ctx_map_engines(int fd, struct intel_engine_data *ed,
                            struct drm_i915_gem_context_param *param)
 {
        struct i915_context_param_engines *engines =
-                       (struct i915_context_param_engines *) param->value;
+                       from_user_pointer(param->value);

Only a single tab indent required.

lib/i915/gem_engine_topology.c static void ctx_map_engines(int fd, struct intel_engine_data *ed, · line 87

Quoted 3 lines
lib/i915/gem_engine_topology.c +0 -0
        int i = 0;
 
        for (typeof(engines->engines[0]) *p =

And struct i915_engine_class_instance was added to make this for() loop nicer.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for lib/i915: Fix pointer cast build issue

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: lib/i915: Fix pointer cast build issue
URL : https://patchwork.freedesktop.org/series/60984/
State : success

== Summary ==

CI Bug Log - changes from IGT_5004 -> IGTPW_3029
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/60984/revisions/1/mbox/

Known issues
------------

Here are the changes found in IGTPW_3029 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_contexts:
- fi-snb-2600: [PASS][1] -> [INCOMPLETE][2] ([fdo#105411])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-snb-2600/igt@i915_selftest@live_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-snb-2600/igt@i915_selftest@live_contexts.html

* igt@kms_flip@basic-flip-vs-wf_vblank:
- fi-bwr-2160: [PASS][3] -> [FAIL][4] ([fdo#100368])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank.html

#### Possible fixes ####

* igt@core_auth@basic-auth:
- {fi-icl-u3}: [DMESG-WARN][5] ([fdo#107724]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-icl-u3/igt@[email protected]

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-blb-e6850/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-blb-e6850/igt@[email protected]

* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: [DMESG-FAIL][9] ([fdo#110235]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
- fi-skl-gvtdvm: [DMESG-FAIL][11] ([fdo#110235]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][13] ([fdo#102614]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-hsw-peppy/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-hsw-peppy/igt@[email protected]

#### Warnings ####

* igt@i915_selftest@live_hangcheck:
- fi-apl-guc: [DMESG-FAIL][15] ([fdo#110620]) -> [FAIL][16] ([fdo#110623])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/fi-apl-guc/igt@i915_selftest@live_hangcheck.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/fi-apl-guc/igt@i915_selftest@live_hangcheck.html

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
[fdo#110620]: https://bugs.freedesktop.org/show_bug.cgi?id=110620
[fdo#110623]: https://bugs.freedesktop.org/show_bug.cgi?id=110623

Participating hosts (53 -> 44)
------------------------------

Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-skl-6770hq fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-dsi fi-bdw-samus

Build changes
-------------

* IGT: IGT_5004 -> IGTPW_3029

CI_DRM_6121: 0a029524f22ca287ec7e515edc1258e7f806750c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3029: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/
IGT_5004: 016830b24f668cc32f7a902923c54355264c1647 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 1/1
#3 lore raw
In reply to Tvrtko Ursulin

Hi Tvrtko,

Quoted 6 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Use from_user_pointer when casting __u64 to a pointer.

Thanks,
Andi
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for lib/i915: Fix pointer cast build issue

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: lib/i915: Fix pointer cast build issue
URL : https://patchwork.freedesktop.org/series/60984/
State : failure

== Summary ==

CI Bug Log - changes from IGT_5004_full -> IGTPW_3029_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_3029_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_3029_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/60984/revisions/1/mbox/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_3029_full:

### IGT changes ###

#### Possible regressions ####

* igt@gem_ctx_isolation@vcs0-nonpriv:
- shard-apl: NOTRUN -> [WARN][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl1/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@bcs0-s3:
- shard-apl: [DMESG-WARN][2] ([fdo#108566]) -> [WARN][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-apl4/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl7/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_3029_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_tiled_swapping@non-threaded:
- shard-apl: [PASS][4] -> [FAIL][5] ([fdo#108686])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-apl2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl4/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: [PASS][6] -> [SKIP][7] ([fdo#109271])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-kbl4/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-kbl3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen:
- shard-glk: [PASS][8] -> [FAIL][9] ([fdo#103167])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-glk6/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-glk4/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: [PASS][10] -> [INCOMPLETE][11] ([fdo#103359] / [k.org#198133])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-glk3/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-glk1/igt@[email protected]

* igt@kms_setmode@basic:
- shard-apl: [PASS][12] -> [FAIL][13] ([fdo#99912])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-apl5/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl8/igt@[email protected]

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: [PASS][14] -> [DMESG-WARN][15] ([fdo#108566]) +5 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-apl2/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl3/igt@[email protected]

#### Possible fixes ####

* igt@i915_suspend@sysfs-reader:
- shard-apl: [DMESG-WARN][16] ([fdo#108566]) -> [PASS][17] +5 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-apl7/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl5/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-hsw: [INCOMPLETE][18] ([fdo#103540]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-hsw6/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-hsw1/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vecs0-s3:
- shard-apl: [WARN][20] -> [DMESG-WARN][21] ([fdo#108566])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-apl6/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-apl4/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-glk: [INCOMPLETE][22] ([fdo#103359] / [k.org#198133]) -> [DMESG-WARN][23] ([fdo#108686])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-glk9/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-glk1/igt@[email protected]
- shard-hsw: [INCOMPLETE][24] ([fdo#103540]) -> [FAIL][25] ([fdo#108686])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5004/shard-hsw2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/shard-hsw5/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

Build changes
-------------

* IGT: IGT_5004 -> IGTPW_3029

CI_DRM_6121: 0a029524f22ca287ec7e515edc1258e7f806750c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3029: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/
IGT_5004: 016830b24f668cc32f7a902923c54355264c1647 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3029/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev