diff options
author | Dave Airlie <airlied@redhat.com> | 2021-12-23 21:01:39 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2021-12-23 21:04:40 +0100 |
commit | 78942ae41d45e135d1db26b4fe147d1ef48b3b2f (patch) | |
tree | 32ba00be9477bc23358a814217c4f8817c23583e /drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | |
parent | Merge tag 'exynos-drm-next-for-v5.17' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
parent | drm/etnaviv: consider completed fence seqno in hang check (diff) | |
download | linux-78942ae41d45e135d1db26b4fe147d1ef48b3b2f.tar.xz linux-78942ae41d45e135d1db26b4fe147d1ef48b3b2f.zip |
Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next
- make etnaviv work on IOMMU enabled systems
- fix mapping of command buffers on systems with more than 4GB RAM
- close a DoS vector
- fix spurious GPU resets
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas Stach <l.stach@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/59619f8e9eb1d7ed7ea72cbead1f0aabc49f4e68.camel@pengutronix.de
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c index b5e8ce86dbe7..b03c20c14ca1 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c @@ -469,6 +469,12 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data, return -EINVAL; } + if (args->stream_size > SZ_64K || args->nr_relocs > SZ_64K || + args->nr_bos > SZ_64K || args->nr_pmrs > 128) { + DRM_ERROR("submit arguments out of size limits\n"); + return -EINVAL; + } + /* * Copy the command submission and bo array to kernel space in * one go, and do this outside of any locks. |