diff options
author | Alexander Richards <electrodeyt@gmail.com> | 2024-01-11 16:04:49 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-01-15 18:35:37 -0500 |
commit | f7a16fa37694a67174d7464279b8768be70ddd48 (patch) | |
tree | eb8965bc6190ee4fa5b5fe7eb1e73b907c34ea94 /drivers/gpu/drm/radeon/atom.h | |
parent | 4630d5031cd87438cc14a4619b8d4148eef1405e (diff) |
drm/radeon: check PS, WS index
Theoretically, it would be possible for a buggy or malicious VBIOS to
overwrite past the bounds of the passed parameters (or its own
workspace); add bounds checking to prevent this from happening.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3093
Signed-off-by: Alexander Richards <electrodeyt@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atom.h')
-rw-r--r-- | drivers/gpu/drm/radeon/atom.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h index 5de0563b63d2..5bf06c0bd6ff 100644 --- a/drivers/gpu/drm/radeon/atom.h +++ b/drivers/gpu/drm/radeon/atom.h @@ -145,8 +145,8 @@ struct atom_context { extern int atom_debug; struct atom_context *atom_parse(struct card_info *, void *); -int atom_execute_table(struct atom_context *, int, uint32_t *); -int atom_execute_table_scratch_unlocked(struct atom_context *, int, uint32_t *); +int atom_execute_table(struct atom_context *, int, uint32_t *, int); +int atom_execute_table_scratch_unlocked(struct atom_context *, int, uint32_t *, int); int atom_asic_init(struct atom_context *); void atom_destroy(struct atom_context *); bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, |