search for: __pu_ptr

Displaying 7 results from an estimated 7 matches for "__pu_ptr".

2016 Nov 25
0
[PATCH 3/3] tools/virtio: use {READ,WRITE}_ONCE() in uaccess.h
...iler.h> > + > +extern void *__user_addr_min, *__user_addr_max; > > static inline void __chk_user_ptr(const volatile void *p, size_t size) > { > @@ -13,7 +14,7 @@ static inline void __chk_user_ptr(const volatile void *p, size_t size) > ({ \ > typeof(ptr) __pu_ptr = (ptr); \ > __chk_user_ptr(__pu_ptr, sizeof(*__pu_ptr)); \ > - ACCESS_ONCE(*(__pu_ptr)) = x; \ > + WRITE_ONCE(*(__pu_ptr), x); \ > 0; \ > }) > > @@ -21,7 +22,7 @@ static inline void __chk_user_ptr(const volatile void *p, size_t size) > ({...
2016 Nov 24
0
[PATCH 3/3] tools/virtio: use {READ,WRITE}_ONCE() in uaccess.h
...ypeof(x) *)&(x)) +#include <linux/compiler.h> + +extern void *__user_addr_min, *__user_addr_max; static inline void __chk_user_ptr(const volatile void *p, size_t size) { @@ -13,7 +14,7 @@ static inline void __chk_user_ptr(const volatile void *p, size_t size) ({ \ typeof(ptr) __pu_ptr = (ptr); \ __chk_user_ptr(__pu_ptr, sizeof(*__pu_ptr)); \ - ACCESS_ONCE(*(__pu_ptr)) = x; \ + WRITE_ONCE(*(__pu_ptr), x); \ 0; \ }) @@ -21,7 +22,7 @@ static inline void __chk_user_ptr(const volatile void *p, size_t size) ({ \ typeof(ptr) __pu_ptr = (ptr); \ __c...
2023 Apr 17
1
[PATCH v3 RESEND 1/2] virtio_ring: add a struct device forward declaration
The virtio_ring header file uses the struct device without a forward declaration. Signed-off-by: Shunsuke Mie <mie at igel.co.jp> --- Changes from v2: https://lore.kernel.org/virtualization/20230410074929-mutt-send-email-mst at kernel.org/ - Fix a typo of commit title include/linux/virtio_ring.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/virtio_ring.h
2023 Apr 10
2
[PATCH v2 1/2] virtio_ring: add a struce device forward declaration
The virtio_ring header file uses the struct device without a forward declaration. Signed-off-by: Shunsuke Mie <mie at igel.co.jp> --- include/linux/virtio_ring.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index 8b95b69ef694..77a9c2f52919 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h @@ -58,6
2016 Nov 24
12
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
For several reasons, it would be beneficial to kill off ACCESS_ONCE() tree-wide, in favour of {READ,WRITE}_ONCE(). These work with aggregate types, more obviously document their intended behaviour, and are necessary for tools like KTSAN to work correctly (as otherwise reads and writes cannot be instrumented separately). While it's possible to script the bulk of this tree-wide conversion, some
2016 Nov 24
12
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
For several reasons, it would be beneficial to kill off ACCESS_ONCE() tree-wide, in favour of {READ,WRITE}_ONCE(). These work with aggregate types, more obviously document their intended behaviour, and are necessary for tools like KTSAN to work correctly (as otherwise reads and writes cannot be instrumented separately). While it's possible to script the bulk of this tree-wide conversion, some
2023 Apr 10
2
[PATCH v2 2/2] tools/virtio: fix build caused by virtio_ring changes
...tile void *p, size_t size) > > -{ > > - assert(p >= __user_addr_min && p + size <= __user_addr_max); > > -} > > - What does this function have to do with container_of()? > > #define put_user(x, ptr) \ > > ({ \ > > typeof(ptr) __pu_ptr = (ptr); \ > > - __chk_user_ptr(__pu_ptr, sizeof(*__pu_ptr)); \ > > + __chk_user_ptr(__pu_ptr); \ Why are you trying to duplicate in-kernel .h files? This all doesn't look ok, sorry. greg k-h