diff options
| author | Stanislav Kinsburskii <skinsburskii@gmail.com> | 2026-07-14 15:54:32 -0700 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2026-07-21 00:27:34 -0700 |
| commit | 67b8bfd4ec7dac6e79a7ad9ad19a7a9d6fc35a26 (patch) | |
| tree | 30fd06ff826e62f3a0366a6f5aa678933eca74cc /tools/perf/scripts/python/stackcollapse.py | |
| parent | 847b371debf3c8c72384ab7b9a0c4123a74cc925 (diff) | |
drm/gpusvm: Zero HMM PFNs before scanning ranges
drm_gpusvm_scan_mm() asks HMM to report the current CPU page-table
state without faulting missing entries by leaving default_flags set to
zero. The HMM PFN array is still caller-owned input/output state, and
the framework may preserve input bits while filling entries. It is not
safe for the caller to hand HMM an uninitialized array and then treat
entries without HMM_PFN_VALID as an authoritative unpopulated result.
Use kvcalloc() for the temporary PFN array so entries that are not
reported as valid start from the documented zero state. This prevents
random stack or heap contents from being interpreted as HMM PFN flags or
PFN values during the scan.
Fixes: f1d08a586482 ("drm/gpusvm: Introduce a function to scan the current migration state")
Cc: stable@vger.kernel.org
Signed-off-by: Stanislav Kinsburskii <skinsburskii@gmail.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/178406967042.1113483.2116704310277917086.stgit@skinsburskii
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
