On Thu, Jul 23, 2020 at 09:40:27AM -0700, Eric Dumazet wrote:
> I am not sure why you chose sockptr_t for something that really seems
> generic.
>
> Or is it really meant to be exclusive to setsockopt() and/or getsockopt() ?
>
> If the first user of this had been futex code, we would have used
On Thursday 2020-07-23 08:08, Christoph Hellwig wrote:
>+typedef struct {
>+ union {
>+ void*kernel;
>+ void __user *user;
>+ };
>+ boolis_kernel : 1;
>+} sockptr_t;
>+
>+static inline bool sockptr_is_null(sockptr_t sockptr)
>+{
Add a uptr_t type that can hold a pointer to either a user or kernel
memory region, and simply helpers to copy to and from it.
Signed-off-by: Christoph Hellwig
---
include/linux/sockptr.h | 104
1 file changed, 104 insertions(+)
create mode 100644 includ