mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 15:23:42 +03:00
[uaccess] Add userptr_sub() to find the difference between two user pointers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -68,6 +68,12 @@ UACCESS_INLINE ( librm, userptr_add ) ( userptr_t userptr, off_t offset ) {
|
||||
return trivial_userptr_add ( userptr, offset );
|
||||
}
|
||||
|
||||
static inline __always_inline off_t
|
||||
UACCESS_INLINE ( librm, userptr_sub ) ( userptr_t userptr,
|
||||
userptr_t subtrahend ) {
|
||||
return trivial_userptr_sub ( userptr, subtrahend );
|
||||
}
|
||||
|
||||
static inline __always_inline void
|
||||
UACCESS_INLINE ( librm, memcpy_user ) ( userptr_t dest, off_t dest_off,
|
||||
userptr_t src, off_t src_off,
|
||||
|
||||
Reference in New Issue
Block a user