Commit e5f10d6
drm/i915: Fix cmd parser desc matching with masks
Our variety of defined gpu commands have the actual
command id field and possibly length and flags applied.
We did start to apply the mask during initialization of
the cmd descriptors but forgot to also apply it on comparisons.
Fix comparisons in order to properly deny access with
associated commands.
v2: fix lri with correct mask (Chris)
References: 926abff ("drm/i915/cmdparser: Ignore Length operands during command matching")
Reported-by: Nicolai Stange <nstange@suse.de>
Cc: stable@vger.kernel.org # v5.4+
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200817195926.12671-1-mika.kuoppala@linux.intel.com
(cherry picked from commit 3b4efa1)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>1 parent d012a71 commit e5f10d6
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1204 | 1204 | | |
1205 | 1205 | | |
1206 | 1206 | | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1207 | 1213 | | |
1208 | 1214 | | |
1209 | 1215 | | |
| |||
1242 | 1248 | | |
1243 | 1249 | | |
1244 | 1250 | | |
1245 | | - | |
| 1251 | + | |
1246 | 1252 | | |
1247 | 1253 | | |
1248 | 1254 | | |
1249 | 1255 | | |
1250 | 1256 | | |
1251 | | - | |
| 1257 | + | |
1252 | 1258 | | |
1253 | 1259 | | |
1254 | 1260 | | |
1255 | 1261 | | |
1256 | 1262 | | |
1257 | | - | |
| 1263 | + | |
1258 | 1264 | | |
1259 | 1265 | | |
1260 | 1266 | | |
| |||
1478 | 1484 | | |
1479 | 1485 | | |
1480 | 1486 | | |
1481 | | - | |
| 1487 | + | |
1482 | 1488 | | |
1483 | 1489 | | |
1484 | 1490 | | |
| |||
0 commit comments