mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-04 11:00:22 +01:00
Make DRM_OS_VERIFYAREA_READ actually verify. Radeon should now be as secure
on BSD as on Linux.
This commit is contained in:
parent
72cdaedece
commit
6f0c4ebd9b
2 changed files with 6 additions and 8 deletions
|
|
@ -148,12 +148,11 @@ do { \
|
|||
#define DRM_OS_COPYFROMUSR(arg1, arg2, arg3) \
|
||||
copyin(arg2, arg1, arg3)
|
||||
/* Macros for userspace access with checking readability once */
|
||||
/* FIXME: can't find equivalent functionality in FreeBSD yet.
|
||||
* We should be able to make the code as secure as linux if a little bit
|
||||
* slower, though I don't believe it is as secure yet.
|
||||
/* FIXME: can't find equivalent functionality for nocheck yet.
|
||||
* It's be slower than linux, but should be correct.
|
||||
*/
|
||||
#define DRM_OS_VERIFYAREA_READ( uaddr, size ) \
|
||||
(0) /*(!useracc(uaddr, size, VM_PROT_READ))*/
|
||||
(!useracc((caddr_t)uaddr, size, VM_PROT_READ))
|
||||
#define DRM_OS_COPYFROMUSR_NC(arg1, arg2, arg3) \
|
||||
copyin(arg2, arg1, arg3)
|
||||
#define DRM_OS_FETCHU_32_NC(val, uaddr) \
|
||||
|
|
|
|||
|
|
@ -148,12 +148,11 @@ do { \
|
|||
#define DRM_OS_COPYFROMUSR(arg1, arg2, arg3) \
|
||||
copyin(arg2, arg1, arg3)
|
||||
/* Macros for userspace access with checking readability once */
|
||||
/* FIXME: can't find equivalent functionality in FreeBSD yet.
|
||||
* We should be able to make the code as secure as linux if a little bit
|
||||
* slower, though I don't believe it is as secure yet.
|
||||
/* FIXME: can't find equivalent functionality for nocheck yet.
|
||||
* It's be slower than linux, but should be correct.
|
||||
*/
|
||||
#define DRM_OS_VERIFYAREA_READ( uaddr, size ) \
|
||||
(0) /*(!useracc(uaddr, size, VM_PROT_READ))*/
|
||||
(!useracc((caddr_t)uaddr, size, VM_PROT_READ))
|
||||
#define DRM_OS_COPYFROMUSR_NC(arg1, arg2, arg3) \
|
||||
copyin(arg2, arg1, arg3)
|
||||
#define DRM_OS_FETCHU_32_NC(val, uaddr) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue