diff options
author | Daniel Vetter <[email protected]> | 2021-03-01 10:52:53 +0100 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2021-03-19 20:15:27 +0100 |
commit | cd5297b0855f17c8b4e3ef1d20c6a3656209c7b3 (patch) | |
tree | b06fb1ba811f436e71dcecad7258c77e9108c602 /scripts/gdb/linux/tasks.py | |
parent | 6909115442759efef3d4bc5d9c54d7943f1afc14 (diff) |
drm/etnaviv: Use FOLL_FORCE for userptr
Nothing checks userptr.ro except this call to pup_fast, which means
there's nothing actually preventing userspace from writing to this.
Which means you can just read-only mmap any file you want, userptr it
and then write to it with the gpu. Not good.
The right way to handle this is FOLL_WRITE | FOLL_FORCE, which will
break any COW mappings and update tracking for MAY_WRITE mappings so
there's no exploit and the vm isn't confused about what's going on.
For any legit use case there's no difference from what userspace can
observe and do.
Reviewed-by: Lucas Stach <[email protected]>
Cc: [email protected]
Cc: John Hubbard <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Russell King <[email protected]>
Cc: Christian Gmeiner <[email protected]>
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions