Changeset 772 for GPL/trunk/include/linux/uio.h
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/include/linux/uio.h
r679 r772 4 4 #define _LINUX_UIO_H 5 5 6 enum { 7 ITER_IOVEC = 0, 8 ITER_KVEC = 2, 9 ITER_BVEC = 4, 6 #include <linux/types.h> 7 8 enum iter_type { 9 /* iter types */ 10 ITER_IOVEC, 11 ITER_KVEC, 12 ITER_BVEC, 13 ITER_XARRAY, 14 ITER_DISCARD, 15 ITER_UBUF, 16 }; 17 18 #define ITER_SOURCE 1 // == WRITE 19 #define ITER_DEST 0 // == READ 20 21 struct kvec { 22 void *iov_base; /* and that should *never* hold a userland pointer */ 23 size_t iov_len; 10 24 }; 11 25 … … 20 34 21 35 struct iov_iter { 22 int type; 23 size_t iov_offset; 24 size_t count; 36 u8 iter_type; 37 bool copy_mc; 38 bool nofault; 39 bool data_source; 40 bool user_backed; 41 union { 42 /* 43 * This really should be a const, but we cannot do that without 44 * also modifying any of the zero-filling iter init functions. 45 * Leave it non-const for now, but it should be treated as such. 46 */ 47 struct iovec __ubuf_iovec; 48 struct { 49 union { 50 /* use iter_iov() to get the current vec */ 51 const struct iovec *__iov; 52 void __user *ubuf; 53 }; 54 size_t count; 55 }; 56 }; 25 57 union { 26 58 const struct iovec *iov; … … 33 65 static inline bool iter_is_iovec(const struct iov_iter *i) 34 66 { 35 return !(i-> type & (ITER_BVEC | ITER_KVEC));67 return !(i->iter_type & (ITER_BVEC | ITER_KVEC)); 36 68 } 37 69 70 static inline const struct iovec *iter_iov(const struct iov_iter *iter) 71 { 72 if (iter->iter_type == ITER_UBUF) 73 return (const struct iovec *) &iter->__ubuf_iovec; 74 return iter->__iov; 75 } 76 int import_ubuf(int type, void __user *buf, size_t len, struct iov_iter *i); 77 38 78 #endif /* _LINUX_UIO_H */
Note:
See TracChangeset
for help on using the changeset viewer.