Commit 2d5cff2
drm/xe: Fix out-of-bounds field write in MI_STORE_DATA_IMM
According to Bspec, bits 0~9 of MI_STORE_DATA_IMM must not exceed 0x3FE.
The macro MI_SDI_NUM_QW(x) evaluates to 2 * x + 1, which means the
condition 2 * x + 1 <= 0x3FE must be satisfied. Therefore, the maximum
valid value for x is 0x1FE, not 0x1FF.
v2
- Replace 0x1fe with macro MAX_PTE_PER_SDI (Auld, Matthew & Patelczyk, Maciej)
v3
- Change macro MAX_PTE_PER_SDI from 0x1fe to 0x1feU (De Marchi, Lucas)
Bspec: 60246
Fixes: 9c44fd5 ("drm/xe: Add migrate layer functions for SVM support")
Cc: Matthew Brost <[email protected]>
Cc: Brian3 Nguyen <[email protected]>
Cc: Alex Zuo <[email protected]>
Cc: Matthew Auld <[email protected]>
Cc: Maciej Patelczyk <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Suggested-by: Shuicheng Lin <[email protected]>
Signed-off-by: Jia Yao <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Reviewed-by: Maciej Patelczyk <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
(cherry picked from commit c038bdb)
Signed-off-by: Lucas De Marchi <[email protected]>1 parent d0b3b7b commit 2d5cff2
1 file changed
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
1553 | 1553 | | |
1554 | 1554 | | |
1555 | 1555 | | |
| 1556 | + | |
1556 | 1557 | | |
1557 | 1558 | | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
1563 | 1565 | | |
1564 | | - | |
| 1566 | + | |
1565 | 1567 | | |
1566 | 1568 | | |
1567 | 1569 | | |
| |||
1577 | 1579 | | |
1578 | 1580 | | |
1579 | 1581 | | |
1580 | | - | |
| 1582 | + | |
1581 | 1583 | | |
1582 | 1584 | | |
1583 | 1585 | | |
| |||
0 commit comments