diff options
| author | Paulo Zanoni <[email protected]> | 2023-06-26 14:22:21 -0700 |
|---|---|---|
| committer | Rodrigo Vivi <[email protected]> | 2023-12-21 11:35:05 -0500 |
| commit | 2e60442a4fef935c76cd70858775b92f565642cc (patch) | |
| tree | 94d00f3bb6fb823e9e5311904378aae01b0b950d /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 7f38e1e1063e1b9b2c8368c741ff5e679091e9f8 (diff) | |
drm/xe: properly check bounds for xe_wait_user_fence_ioctl()
If !no_engines, then we use copy_from_user to copy to the 'eci' array,
which has XE_HW_ENGINE_MAX_INSTANCE members. The amount of members
copied is given by the user in args->num_engines, so add code to check
that args->num_engines does not exceed XE_HW_ENGINE_MAX_INSTANCE. It's
an unsigned value so there's no need to check for negative values.
Fixes error messages such as:
Buffer overflow detected (54 < 18446744073709551520)!
Reviewed-by: José Roberto de Souza <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions