Re: [PATCH] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-11 Thread Dan Carpenter
On Wed, Apr 11, 2018 at 10:49:47AM -0700, Greg Hartman wrote: > > + /* Ensure that the offset is within shared memory */ > > + if (((uint64_t)arg->offset) + region_p->region_begin_offset + > > + sizeof(uint32_t) > region_p->region_end_offset) > > I'm not certain if I understand

Re: [PATCH] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-11 Thread Dan Carpenter
On Wed, Apr 11, 2018 at 10:49:47AM -0700, Greg Hartman wrote: > > + /* Ensure that the offset is within shared memory */ > > + if (((uint64_t)arg->offset) + region_p->region_begin_offset + > > + sizeof(uint32_t) > region_p->region_end_offset) > > I'm not certain if I understand

Re: [PATCH] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-11 Thread Dan Carpenter
On Tue, Apr 10, 2018 at 12:06:47PM -0700, Alistair Strachan wrote: > +static int do_create_fd_scoped_permission( > + struct vsoc_device_region *region_p, > + struct fd_scoped_permission_node *np, > + struct fd_scoped_permission_arg *__user arg) > +{ > + struct file *managed_filp; >

Re: [PATCH] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-11 Thread Dan Carpenter
On Tue, Apr 10, 2018 at 12:06:47PM -0700, Alistair Strachan wrote: > +static int do_create_fd_scoped_permission( > + struct vsoc_device_region *region_p, > + struct fd_scoped_permission_node *np, > + struct fd_scoped_permission_arg *__user arg) > +{ > + struct file *managed_filp; >

[PATCH] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-10 Thread Alistair Strachan
From: Greg Hartman The cuttlefish system is a virtual SoC architecture based on QEMU. It uses the QEMU ivshmem feature to share memory regions between guest and host with a custom protocol. Cc: Greg Kroah-Hartman Cc: Arve Hjønnevåg

[PATCH] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-10 Thread Alistair Strachan
From: Greg Hartman The cuttlefish system is a virtual SoC architecture based on QEMU. It uses the QEMU ivshmem feature to share memory regions between guest and host with a custom protocol. Cc: Greg Kroah-Hartman Cc: Arve Hjønnevåg Cc: Todd Kjos Cc: Martijn Coenen Cc: