drm/i915: Fix "mitigations" parsing if i915 is builtin
Subsystems (2)
PATCH 1/1 drm/i915: Fix "mitigations" parsing if i915 is builtin
I met below error during boot with i915 builtin if pass "i915.mitigations=off":
[ 0.015589] Booting kernel: `off' invalid for parameter `i915.mitigations'
The reason is slab subsystem isn't ready at that time, so kstrdup() returns NULL. Fix this issue by using stack var instead of kstrdup().
--- drivers/gpu/drm/i915/i915_mitigations.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_mitigations.c +2 -5
@@ -29,15 +29,13 @@ bool i915_mitigate_clear_residuals(void)static int mitigations_set (const char *val,const struct kernel_param *kp) {unsigned long new = ~0UL ; -char *str, *sep, *tok; +char str[64 ], *sep, *tok;bool first = true;int err =0 ;BUILD_BUG_ON (ARRAY_SIZE (names) >=BITS_PER_TYPE (mitigations)); - str =kstrdup (val,GFP_KERNEL ); -if (!str) -return -ENOMEM ; +strncpy (str, val,sizeof (str) -1 );for (sep = str; (tok =strsep (&sep,"," ));) {bool enable = true;
@@ -86,7 +84,6 @@ static int mitigations_set(const char *val, const struct kernel_param *kp)break ; } } -kfree (str);if (err)return err;
Signature · 1 line
2.31.0
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: Fix "mitigations" parsing if i915 is builtin
== Series Details ==
== Series Details ==
Series: drm/i915: Fix "mitigations" parsing if i915 is builtin
URL : https://patchwork.freedesktop.org/series/88998/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 ./drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fix "mitigations" parsing if i915 is builtin
In reply to Jisheng Zhang== Series Details ==
== Series Details ==
Series: drm/i915: Fix "mitigations" parsing if i915 is builtin
URL : https://patchwork.freedesktop.org/series/88998/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9963 -> Patchwork_19921
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/index.html
Known issues
------------
Here are the changes found in Patchwork_19921 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_prime@amd-to-i915:
- fi-kbl-soraka: NOTRUN -> [SKIP][1] ([fdo#109271])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/fi-kbl-soraka/igt@amdgpu/[email protected]
#### Possible fixes ####
* igt@debugfs_test@read_all_entries:
- fi-kbl-soraka: [DMESG-WARN][2] ([i915#1982] / [i915#262]) -> [PASS][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
[i915#3180]: https://gitlab.freedesktop.org/drm/intel/issues/3180
[i915#3278]: https://gitlab.freedesktop.org/drm/intel/issues/3278
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
Participating hosts (47 -> 42)
------------------------------
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9963 -> Patchwork_19921
CI-20190529: 20190529
CI_DRM_9963: f71c7917b4b6d6c093f1e65e62acd3360d96e63a @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6063: d3b7f74ce5df6fdea03e490b7c64f0c6bfe76f03 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19921: 3966bf7f93e0943232055d56216b41318427066a @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
3966bf7f93e0 drm/i915: Fix "mitigations" parsing if i915 is builtin
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix "mitigations" parsing if i915 is builtin
In reply to Jisheng Zhang== Series Details ==
== Series Details ==
Series: drm/i915: Fix "mitigations" parsing if i915 is builtin
URL : https://patchwork.freedesktop.org/series/88998/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9963_full -> Patchwork_19921_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_19921_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_19921_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_19921_full:
### IGT changes ###
#### Possible regressions ####
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-skl: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl10/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl5/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_19921_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_create@create-massive:
- shard-snb: NOTRUN -> [DMESG-WARN][3] ([i915#3002])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-snb2/igt@[email protected]
* igt@gem_ctx_persistence@hostile:
- shard-snb: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1099]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-snb2/igt@[email protected]
* igt@gem_ctx_ringsize@idle@bcs0:
- shard-skl: NOTRUN -> [INCOMPLETE][5] ([i915#3316])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl9/igt@gem_ctx_ringsize@[email protected]
* igt@gem_eio@unwedge-stress:
- shard-iclb: [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#2481] / [i915#3070])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb6/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb6/igt@[email protected]
* igt@gem_exec_big@single:
- shard-skl: [PASS][8] -> [DMESG-WARN][9] ([i915#1982])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl8/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl7/igt@[email protected]
* igt@gem_exec_fair@basic-deadline:
- shard-skl: NOTRUN -> [FAIL][10] ([i915#2846])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl9/igt@[email protected]
* igt@gem_exec_fair@basic-none-vip@rcs0:
- shard-glk: NOTRUN -> [FAIL][11] ([i915#2842])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vcs0:
- shard-kbl: [PASS][12] -> [FAIL][13] ([i915#2842]) +1 similar issue
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl6/igt@gem_exec_fair@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl3/igt@gem_exec_fair@[email protected]
- shard-glk: [PASS][14] -> [FAIL][15] ([i915#2842]) +4 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-glk7/igt@gem_exec_fair@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk2/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vcs1:
- shard-iclb: NOTRUN -> [FAIL][16] ([i915#2842])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb2/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@vcs1:
- shard-tglb: [PASS][17] -> [FAIL][18] ([i915#2842])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-tglb2/igt@gem_exec_fair@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb1/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@vecs0:
- shard-iclb: [PASS][19] -> [FAIL][20] ([i915#2842])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb1/igt@gem_exec_fair@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [PASS][21] -> [FAIL][22] ([i915#2849])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb1/igt@gem_exec_fair@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_flush@basic-batch-kernel-default-cmd:
- shard-snb: NOTRUN -> [SKIP][23] ([fdo#109271]) +131 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-snb2/igt@[email protected]
* igt@gem_exec_reloc@basic-wide-active@bcs0:
- shard-apl: NOTRUN -> [FAIL][24] ([i915#2389]) +3 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl7/igt@gem_exec_reloc@[email protected]
- shard-skl: NOTRUN -> [FAIL][25] ([i915#2389]) +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl7/igt@gem_exec_reloc@[email protected]
* igt@gem_render_copy@x-tiled-to-vebox-yf-tiled:
- shard-kbl: NOTRUN -> [SKIP][26] ([fdo#109271]) +62 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl4/igt@[email protected]
* igt@gem_userptr_blits@input-checking:
- shard-apl: NOTRUN -> [DMESG-WARN][27] ([i915#3002])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@[email protected]
* igt@gem_userptr_blits@process-exit-mmap@wb:
- shard-apl: NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#1699]) +3 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@gem_userptr_blits@[email protected]
* igt@gem_userptr_blits@set-cache-level:
- shard-snb: NOTRUN -> [FAIL][29] ([i915#3324])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-snb5/igt@[email protected]
* igt@gem_userptr_blits@unsync-unmap-cycles:
- shard-tglb: NOTRUN -> [SKIP][30] ([i915#3297])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb5/igt@[email protected]
* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-skl: NOTRUN -> [SKIP][31] ([fdo#109271] / [i915#658]) +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl1/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][32] -> [FAIL][33] ([i915#454])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb1/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb6/igt@[email protected]
* igt@kms_async_flips@alternate-sync-async-flip:
- shard-skl: [PASS][34] -> [FAIL][35] ([i915#2521])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl5/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl8/igt@[email protected]
* igt@kms_async_flips@test-time-stamp:
- shard-tglb: [PASS][36] -> [FAIL][37] ([i915#2574])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-tglb7/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb7/igt@[email protected]
* igt@kms_big_joiner@basic:
- shard-apl: NOTRUN -> [SKIP][38] ([fdo#109271] / [i915#2705])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl6/igt@[email protected]
* igt@kms_chamelium@dp-crc-multiple:
- shard-glk: NOTRUN -> [SKIP][39] ([fdo#109271] / [fdo#111827]) +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@kms_chamelium@hdmi-aspect-ratio:
- shard-skl: NOTRUN -> [SKIP][40] ([fdo#109271] / [fdo#111827]) +7 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl1/igt@[email protected]
* igt@kms_chamelium@vga-hpd:
- shard-tglb: NOTRUN -> [SKIP][41] ([fdo#109284] / [fdo#111827]) +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb5/igt@[email protected]
* igt@kms_color_chamelium@pipe-a-ctm-limited-range:
- shard-apl: NOTRUN -> [SKIP][42] ([fdo#109271] / [fdo#111827]) +20 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl7/igt@[email protected]
* igt@kms_color_chamelium@pipe-b-ctm-max:
- shard-snb: NOTRUN -> [SKIP][43] ([fdo#109271] / [fdo#111827]) +6 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-snb5/igt@[email protected]
* igt@kms_color_chamelium@pipe-c-ctm-limited-range:
- shard-kbl: NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827]) +6 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl3/igt@[email protected]
* igt@kms_content_protection@srm:
- shard-glk: NOTRUN -> [SKIP][45] ([fdo#109271]) +27 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-d-128x128-right-edge:
- shard-skl: NOTRUN -> [SKIP][46] ([fdo#109271]) +108 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl4/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-blt-ytiled:
- shard-glk: NOTRUN -> [FAIL][47] ([i915#52] / [i915#54])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [PASS][48] -> [INCOMPLETE][49] ([i915#180])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-apl2/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@[email protected]
* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
- shard-kbl: NOTRUN -> [FAIL][50] ([i915#2641])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl4/igt@[email protected]
- shard-apl: NOTRUN -> [FAIL][51] ([i915#2641])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl6/igt@[email protected]
* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs:
- shard-skl: NOTRUN -> [SKIP][52] ([fdo#109271] / [i915#2672])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl7/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][53] ([fdo#109271] / [i915#2672])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl7/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-onoff:
- shard-tglb: NOTRUN -> [SKIP][54] ([fdo#111825]) +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb5/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-kbl: [PASS][55] -> [DMESG-WARN][56] ([i915#180]) +7 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl2/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl7/igt@[email protected]
* igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
- shard-skl: NOTRUN -> [SKIP][57] ([fdo#109271] / [i915#533])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl9/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
- shard-apl: NOTRUN -> [SKIP][58] ([fdo#109271] / [i915#533]) +1 similar issue
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-kbl: NOTRUN -> [FAIL][59] ([fdo#108145] / [i915#265])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-apl: NOTRUN -> [FAIL][60] ([fdo#108145] / [i915#265]) +2 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-skl: NOTRUN -> [FAIL][61] ([fdo#108145] / [i915#265]) +1 similar issue
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-glk: NOTRUN -> [FAIL][62] ([fdo#108145] / [i915#265])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][63] -> [FAIL][64] ([fdo#108145] / [i915#265]) +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl6/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl2/igt@[email protected]
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1:
- shard-apl: NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#658]) +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl7/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3:
- shard-glk: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#658])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@kms_psr@psr2_dpms:
- shard-iclb: [PASS][67] -> [SKIP][68] ([fdo#109441]) +1 similar issue
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb2/igt@kms_psr@psr2_dpms.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb8/igt@kms_psr@psr2_dpms.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][69] -> [DMESG-WARN][70] ([i915#180] / [i915#295])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl1/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl6/igt@[email protected]
* igt@kms_vblank@pipe-d-ts-continuation-idle:
- shard-apl: NOTRUN -> [SKIP][71] ([fdo#109271]) +184 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl7/igt@[email protected]
* igt@kms_writeback@writeback-invalid-parameters:
- shard-glk: NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#2437])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@kms_writeback@writeback-pixel-formats:
- shard-apl: NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#2437])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl7/igt@[email protected]
* igt@perf_pmu@rc6-suspend:
- shard-apl: [PASS][74] -> [DMESG-WARN][75] ([i915#180])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-apl8/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl1/igt@[email protected]
* igt@sysfs_clients@fair-7:
- shard-glk: NOTRUN -> [SKIP][76] ([fdo#109271] / [i915#2994])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk7/igt@[email protected]
* igt@sysfs_clients@split-10:
- shard-skl: NOTRUN -> [SKIP][77] ([fdo#109271] / [i915#2994]) +1 similar issue
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl1/igt@[email protected]
* igt@sysfs_clients@split-25:
- shard-kbl: NOTRUN -> [SKIP][78] ([fdo#109271] / [i915#2994]) +1 similar issue
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl4/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][79] ([fdo#109271] / [i915#2994]) +2 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl6/igt@[email protected]
* igt@sysfs_heartbeat_interval@mixed@rcs0:
- shard-skl: [PASS][80] -> [FAIL][81] ([i915#1731])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl8/igt@sysfs_heartbeat_interval@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl7/igt@sysfs_heartbeat_interval@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-kbl: [DMESG-WARN][82] ([i915#180]) -> [PASS][83] +1 similar issue
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl4/igt@gem_ctx_isolation@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl3/igt@gem_ctx_isolation@[email protected]
* igt@gem_eio@unwedge-stress:
- shard-tglb: [TIMEOUT][84] ([i915#2369] / [i915#3063]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-tglb8/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb2/igt@[email protected]
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [FAIL][86] ([i915#2842]) -> [PASS][87] +2 similar issues
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-tglb1/igt@gem_exec_fair@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_whisper@basic-contexts-priority-all:
- shard-glk: [DMESG-WARN][88] ([i915#118] / [i915#95]) -> [PASS][89]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-glk9/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk4/igt@[email protected]
* igt@gem_mmap_gtt@big-copy-odd:
- shard-skl: [FAIL][90] ([i915#307]) -> [PASS][91]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl4/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl9/igt@[email protected]
* igt@gem_mmap_gtt@big-copy-xy:
- shard-glk: [FAIL][92] ([i915#307]) -> [PASS][93]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-glk6/igt@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk3/igt@[email protected]
* igt@gem_vm_create@destroy-race:
- shard-tglb: [INCOMPLETE][94] ([i915#3325]) -> [PASS][95]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-tglb3/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-tglb5/igt@[email protected]
* igt@i915_pm_dc@dc9-dpms:
- shard-apl: [FAIL][96] -> [PASS][97]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-apl2/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-b-256x256-top-edge:
- shard-snb: [SKIP][98] ([fdo#109271]) -> [PASS][99] +3 similar issues
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-snb2/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-snb5/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-render-xtiled:
- shard-glk: [FAIL][100] ([i915#52] / [i915#54]) -> [PASS][101]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-glk9/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-glk4/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][102] ([i915#1188]) -> [PASS][103]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl6/igt@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl1/igt@[email protected]
* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: [SKIP][104] ([fdo#109441]) -> [PASS][105] +1 similar issue
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb4/igt@kms_psr@psr2_sprite_blt.html
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html
* igt@perf@polling-parameterized:
- shard-skl: [FAIL][106] ([i915#1542]) -> [PASS][107]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl9/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl1/igt@[email protected]
#### Warnings ####
* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-iclb: [FAIL][108] ([i915#2842]) -> [FAIL][109] ([i915#2852])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb6/igt@gem_exec_fair@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb4/igt@gem_exec_fair@[email protected]
* igt@i915_pm_dc@dc9-dpms:
- shard-iclb: [FAIL][110] ([i915#3343]) -> [SKIP][111] ([i915#3288])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb5/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb2/igt@[email protected]
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
- shard-iclb: [SKIP][112] ([i915#2920]) -> [SKIP][113] ([i915#658]) +2 similar issues
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb2/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb8/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1:
- shard-iclb: [SKIP][114] ([i915#658]) -> [SKIP][115] ([i915#2920]) +2 similar issues
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-iclb3/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-iclb2/igt@[email protected]
* igt@runner@aborted:
- shard-kbl: ([FAIL][116], [FAIL][117], [FAIL][118], [FAIL][119], [FAIL][120], [FAIL][121]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#2505] / [i915#3002] / [i915#602]) -> ([FAIL][122], [FAIL][123], [FAIL][124], [FAIL][125], [FAIL][126], [FAIL][127], [FAIL][128], [FAIL][129], [FAIL][130]) ([i915#180] / [i915#1814] / [i915#2505] / [i915#3002] / [i915#602])
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl4/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl1/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl2/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl2/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl4/igt@[email protected]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-kbl6/igt@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl7/igt@[email protected]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl1/igt@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl6/igt@[email protected]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl6/igt@[email protected]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl6/igt@[email protected]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl7/igt@[email protected]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl4/igt@[email protected]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl2/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-kbl6/igt@[email protected]
- shard-apl: [FAIL][131] ([i915#3002]) -> ([FAIL][132], [FAIL][133], [FAIL][134]) ([i915#1610] / [i915#180] / [i915#2292] / [i915#3002])
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-apl1/igt@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@[email protected]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl1/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-apl8/igt@[email protected]
- shard-skl: ([FAIL][135], [FAIL][136], [FAIL][137], [FAIL][138], [FAIL][139], [FAIL][140]) ([i915#1982] / [i915#2029] / [i915#3002]) -> ([FAIL][141], [FAIL][142], [FAIL][143]) ([i915#2029] / [i915#2263] / [i915#3002])
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl2/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl5/igt@[email protected]
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl1/igt@[email protected]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl2/igt@[email protected]
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl2/igt@[email protected]
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9963/shard-skl4/igt@[email protected]
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl2/igt@[email protected]
[142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl2/igt@[email protected]
[143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/shard-skl10/igt@[email protected]
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1610]: https://gitlab.freedesktop.org/drm/intel/issues/1610
[i915#1699]: https://gitlab.freedesktop.org/drm/intel/issues/1699
[i915#1731]: https://gitlab.freedesktop.org/drm/intel/issues/1731
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2029]: https://gitlab.freedesktop.org/drm/intel/issues/2029
[i915#2263]: https://gitlab.freedesktop.org/drm/intel/issues/2263
[i915#2292]: https://gitlab.freedesktop.org/drm/intel/issues/2292
[i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369
[i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2481]: https://gitlab.freedesktop.org/drm/intel/issues/2481
[i915#2505]: https://gitlab.freedesktop.org/drm/intel/issues/2505
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2574]: https://gitlab.freedesktop.org/drm/intel/issues/2574
[i915#2641]: https://gitlab.freedesktop.org/drm/intel/issues/2641
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#2842]: https://gitlab.freedesktop.o
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19921/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Jisheng Zhang
I met below error during boot with i915 builtin if pass "i915.mitigations=off":
[ 0.015589] Booting kernel: `off' invalid for parameter `i915.mitigations'The reason is slab subsystem isn't ready at that time, so
kstrdup()returns NULL. Fix this issue by using stack var instead ofkstrdup().Fixes 984cadea032b ("drm/i915: Allow the sysadmin to override security mitigations")Signed-off-by Jisheng Zhang <[email protected]>--- drivers/gpu/drm/i915/i915_mitigations.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_mitigations.c +0
-1@@ -29,15 +29,13 @@ bool i915_mitigate_clear_residuals(void)static int mitigations_set (const char *val,const struct kernel_param *kp) {unsigned long new = ~0UL ; -char *str, *sep, *tok;
drivers/gpu/drm/i915/i915_mitigations.c bool i915_mitigate_clear_residuals(void) · line 38
Quoted 10 lines
drivers/gpu/drm/i915/i915_mitigations.c +2
-3+char str[64 ], *sep, *tok;bool first = true;int err =0 ;BUILD_BUG_ON (ARRAY_SIZE (names) >=BITS_PER_TYPE (mitigations)); - str =kstrdup (val,GFP_KERNEL ); -if (!str) -return -ENOMEM ; +strncpy (str, val,sizeof (str) -1 );
I don't think strncpy() guarantees that the string is properly terminated.
Also commit b1b6bed3b503 ("usb: core: fix quirks_param_set() writing to a const pointer") looks broken as well given your findings, and arch/um/drivers/virtio_uml.c seems to suffer from this as well. kernel/params.c itself seems to have some slab_is_available() magic around kmalloc().
I used the following cocci snippet to find these:
@find@
identifier O, F;
position PS;
@@
struct kernel_param_ops O = {
...,
.set = F@PS
,...
};
@alloc@
identifier ALLOC =~ "^k.*(alloc|dup)";
identifier find.F;
position PA;
@@
F(...) {
<+...
ALLOC@PA(...)
...+>
}
@script:python depends on alloc@
ps << find.PS;
pa << alloc.PA;
@@coccilib.report.print_report(ps[0], "struct")coccilib.report.print_report(pa[0], "alloc")
That could of course miss a bunch more if they allocate via some other function I didn't consider.
Signature · 2 lines
Ville Syrjälä Intel
Quoted 38 lines · On Tue, 13 Apr 2021 19:59:34 +0300 Ville Syrjälä wrote:
Quoted 22 lines · Jisheng Zhang
I met below error during boot with i915 builtin if pass "i915.mitigations=off":
[ 0.015589] Booting kernel: `off' invalid for parameter `i915.mitigations'The reason is slab subsystem isn't ready at that time, so
kstrdup()returns NULL. Fix this issue by using stack var instead ofkstrdup().Fixes 984cadea032b ("drm/i915: Allow the sysadmin to override security mitigations")Signed-off-by Jisheng Zhang <[email protected]>--- drivers/gpu/drm/i915/i915_mitigations.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_mitigations.c +0
-1@@ -29,15 +29,13 @@ bool i915_mitigate_clear_residuals(void)static int mitigations_set (const char *val,const struct kernel_param *kp) {unsigned long new = ~0UL ; -char *str, *sep, *tok;drivers/gpu/drm/i915/i915_mitigations.c bool i915_mitigate_clear_residuals(void) · line 38
Quoted 10 lines
drivers/gpu/drm/i915/i915_mitigations.c +2
-3+char str[64 ], *sep, *tok;bool first = true;int err =0 ;BUILD_BUG_ON (ARRAY_SIZE (names) >=BITS_PER_TYPE (mitigations)); - str =kstrdup (val,GFP_KERNEL ); -if (!str) -return -ENOMEM ; +strncpy (str, val,sizeof (str) -1 );I don't think
strncpy()guarantees that the string is properly terminated.
Quoted 3 lines
Also commit
b1b6bed3b503("usb: core: fixquirks_param_set()writing to a const pointer") looks broken as well given your findings, andarch/um/drivers/virtio_uml.cseems to suffer from this as well.
wow thank you so much. I will send out patches to fix them as well.
Quoted 4 lines
kernel/params.citself seems to have someslab_is_available()magic aroundkmalloc().I used the following cocci snippet to find these:
Nice cocci script.
Quoted 28 lines
@find@
identifier O, F;
position PS;
@@
structkernel_param_opsO = {
...,.set = F@PS,...
};@alloc@
identifier ALLOC =~ "^k.*(alloc|dup)";
identifier find.F;
position PA;
@@
F(...) {
<+...
ALLOC@PA(...)
...+>
}@script:python depends on alloc@
ps << find.PS;
pa << alloc.PA;
@@coccilib.report.print_report(ps[0], "struct")coccilib.report.print_report(pa[0], "alloc")
Quoted 6 lines
That could of course miss a bunch more if they allocate via some other function I didn't consider.
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Ville,
Quoted 39 lines · On Tue, 13 Apr 2021 19:59:34 +0300 Ville Syrjälä wrote:
Quoted 22 lines · Jisheng Zhang
I met below error during boot with i915 builtin if pass "i915.mitigations=off":
[ 0.015589] Booting kernel: `off' invalid for parameter `i915.mitigations'The reason is slab subsystem isn't ready at that time, so
kstrdup()returns NULL. Fix this issue by using stack var instead ofkstrdup().Fixes 984cadea032b ("drm/i915: Allow the sysadmin to override security mitigations")Signed-off-by Jisheng Zhang <[email protected]>--- drivers/gpu/drm/i915/i915_mitigations.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_mitigations.c +0
-1@@ -29,15 +29,13 @@ bool i915_mitigate_clear_residuals(void)static int mitigations_set (const char *val,const struct kernel_param *kp) {unsigned long new = ~0UL ; -char *str, *sep, *tok;drivers/gpu/drm/i915/i915_mitigations.c bool i915_mitigate_clear_residuals(void) · line 38
Quoted 10 lines
drivers/gpu/drm/i915/i915_mitigations.c +2
-3+char str[64 ], *sep, *tok;bool first = true;int err =0 ;BUILD_BUG_ON (ARRAY_SIZE (names) >=BITS_PER_TYPE (mitigations)); - str =kstrdup (val,GFP_KERNEL ); -if (!str) -return -ENOMEM ; +strncpy (str, val,sizeof (str) -1 );I don't think
strncpy()guarantees that the string is properly terminated.
Quoted 5 lines
Also commit
b1b6bed3b503("usb: core: fixquirks_param_set()writing to a const pointer") looks broken as well given your findings, andarch/um/drivers/virtio_uml.cseems to suffer from this as well.kernel/params.citself seems to have someslab_is_available()magic aroundkmalloc().
Just tried the "usbcore.quirks" with usb builtin, I can't reproduce the issue. Futher investigation shows that device_param_cb() macro is the key, or the "6" in __level_param_cb(name, ops, arg, perm, 6) is the key. While i915.mitigations uses module_param_cb_unsafe(), in which the level will be "-1"
arch/um/drivers/virtio_uml.c also makes use of device_param_cb()
thanks
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel