Re: [PATCH 0/9] avoid mixing __user and kernel pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 20, 2012 at 09:44:00AM +0100, Ian Abbott wrote:
> On 2012/09/19 08:10 PM, Dan Carpenter wrote:
> > Gar.  Moving the pointer around sucks.  It's just not worth it.  It
> > makes the code more complicated.  In the end, we're going to audit
> > the ioctls first when we look for security bugs in this code.  The
> > chance that a bug is going to be introduced because of a missing
> > __user tag is not very high.
> > 
> > Of course, the memory leak fixes are good and the pass by reference
> > changes are good.
> > 
> > It's not my code and all, but the way it's done now is the simplest.
> 
> Apart from mixing user and kernel pointers in the same type and some
> ugly-looking workarounds in the CONFIG_COMPAT code?

It's just mixed in do_cmd_ioct() and do_cmdtest_ioctl().  It's not
so bad.  The "ugly-looking workarounds" is adding a single cast.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux