Thread (5 messages) 5 messages, 4 authors, 2015-12-08

Re: [PATCH v8 44/55] [media] uapi/media.h: Add MEDIA_IOC_G_TOPOLOGY ioctl

From: Arnd Bergmann <hidden>
Date: 2015-12-08 19:49:05
Also in: linux-media

Possibly related (same subject, not in this thread)

On Tuesday 08 December 2015 17:23:40 Mauro Carvalho Chehab wrote:
quoted
quoted
+
+struct media_v2_topology {
+   __u32 topology_version;
+
+   __u32 num_entities;
+   struct media_v2_entity *entities;
The kernel seems to be moving to using __u64 instead of pointers in userspace-
facing structures to avoid compat32 code.
We had such discussion at the MC summit. I don't object to change to
__u64, but we need to reach a consensus 
Just saw the email fly by. Using a __u64 to pass a pointer is generally
the preferred method for most subsystems these days.

However, that means you probably want to extract the pointer from
that using something like

static inline void __user *get_upointer(u64 arg)
{
	return (void __user *)(uintptr_t)arg;
}

This is the only way that I know that works on both 32-bit and 64-bit
architectures as well as the oddball s390 compat mode (which you don't
care about because there are no media devices on s390).

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help