Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-14 Thread Dmitry V. Levin
On Sun, Jun 14, 2015 at 01:12:45PM +0200, Patrik Jakobsson wrote: [...] > How about adding a "void *private" field to struct tcb. That way any > syscall can store additional data across the life of the tcb. We can add a field to struct tcb, but its semantics wrt memory management should be strictl

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-14 Thread Patrik Jakobsson
On Sat, Jun 13, 2015 at 1:41 AM, Dmitry V. Levin wrote: > On Thu, Jun 11, 2015 at 04:11:49PM +0200, Patrik Jakobsson wrote: >> On Thu, Jun 11, 2015 at 02:26:59AM +0300, Dmitry V. Levin wrote: >> > On Wed, Jun 10, 2015 at 01:52:33PM +0200, Patrik Jakobsson wrote: >> > > On Wed, Jun 10, 2015 at 01:1

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-12 Thread Dmitry V. Levin
On Thu, Jun 11, 2015 at 04:11:49PM +0200, Patrik Jakobsson wrote: > On Thu, Jun 11, 2015 at 02:26:59AM +0300, Dmitry V. Levin wrote: > > On Wed, Jun 10, 2015 at 01:52:33PM +0200, Patrik Jakobsson wrote: > > > On Wed, Jun 10, 2015 at 01:14:20AM +0300, Dmitry V. Levin wrote: > > > > On Tue, Jun 09, 2

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-11 Thread Patrik Jakobsson
On Thu, Jun 11, 2015 at 02:26:59AM +0300, Dmitry V. Levin wrote: > On Wed, Jun 10, 2015 at 01:52:33PM +0200, Patrik Jakobsson wrote: > > On Wed, Jun 10, 2015 at 01:14:20AM +0300, Dmitry V. Levin wrote: > > > On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: > [...] > > > > +#define

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-10 Thread Dmitry V. Levin
On Wed, Jun 10, 2015 at 01:52:33PM +0200, Patrik Jakobsson wrote: > On Wed, Jun 10, 2015 at 01:14:20AM +0300, Dmitry V. Levin wrote: > > On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: [...] > > > +#define DRM_MAX_NAME_LEN 128 > > > + > > > +inline int drm_is_priv(const unsigned i

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-10 Thread Patrik Jakobsson
On Wed, Jun 10, 2015 at 01:14:20AM +0300, Dmitry V. Levin wrote: > On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: > [...] > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -121,6 +121,7 @@ strace_SOURCES =\ > > utime.c \ > > utimes.c\ > > v4l2

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: [...] > +static int drm_get_driver_name(struct tcb *tcp, char *name, size_t bufsize) > +{ > + char path[PATH_MAX]; > + char link[PATH_MAX]; > + int ret; > + > + ret = getfdpath(tcp, tcp->u_arg[0], path, PATH_MAX - 1);

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: [...] > --- a/Makefile.am > +++ b/Makefile.am > @@ -121,6 +121,7 @@ strace_SOURCES = \ > utime.c \ > utimes.c\ > v4l2.c \ > + drm.c \ > vsprintf.c \ > wait.c

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Patrik Jakobsson
On Tue, Jun 09, 2015 at 03:51:10PM +0200, Gabriel Laskar wrote: > On Tue, 9 Jun 2015 13:26:42 +0200 > Patrik Jakobsson wrote: > > > Signed-off-by: Patrik Jakobsson > > --- > > Makefile.am | 1 + > > defs.h | 6 - > > drm.c | 88 > >

Re: [Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Gabriel Laskar
On Tue, 9 Jun 2015 13:26:42 +0200 Patrik Jakobsson wrote: > Signed-off-by: Patrik Jakobsson > --- > Makefile.am | 1 + > defs.h | 6 - > drm.c | 88 > + > io.c| 2 +- > ioctl.c | 13 - > 5 files

[Intel-gfx] [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Patrik Jakobsson
Signed-off-by: Patrik Jakobsson --- Makefile.am | 1 + defs.h | 6 - drm.c | 88 + io.c| 2 +- ioctl.c | 13 - 5 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 drm.c diff --git