Re: [patch 03/11] GRU Driver - driver internal header files

From: Jack Steiner
Date: Tue Jun 10 2008 - 10:57:21 EST


On Mon, Jun 09, 2008 at 02:38:18PM -0700, Roland Dreier wrote:
> > +/*
> > + * Structure used to pass TLB flush parameters to the driver
> > + */
> > +struct gru_flush_tlb_req {
> > + unsigned long gseg;
> > + unsigned long vaddr;
> > + size_t len;
> > +};
>
> This and other data structures you pass into the kernel via ioctl() are
> not 32/64 clean. So a 32-bit process (which can easily run on a 64-bit
> x86-64 kernel) will end up sending garbage to the kernel.

Good point in general but I don't this this will be an issue for us.
The data structures are used only in libgru.so - a library used to
externalize the GRU to user applications. We will provide only -64
bit versions of this library.

If an abusive -32 bit application _tried_ to issue the system calls, the
parameters should fail the validity checking in the driver.


--- jack
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/