RE: [PATCH RFC v2 0/6] staging: comedi: fix user/kernel space access of cmd->chanlist

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

 



On Tuesday, September 18, 2012 12:13 PM, Dan Carpenter wrote:
> This introduces some new Sparse warnings in the compat code.

Ugh.. I thought my .config was building this driver since it was in
my build log.

I think the Makefile should be fixed so the #ifdef CONFIG_COMPAT
can be removed from comedi_compat32.c. Oh well, different issue.

>    CHECK   drivers/staging/comedi/comedi_compat32.c
> drivers/staging/comedi/comedi_compat32.c:212:16: warning: cast removes address space of expression
> drivers/staging/comedi/comedi_compat32.c:212:16: warning: cast removes address space of expression
> drivers/staging/comedi/comedi_compat32.c:212:16: warning: cast removes address space of expression
> drivers/staging/comedi/comedi_compat32.c:212:16: warning: cast removes address space of expression
>    CC [M]  drivers/staging/comedi/comedi_compat32.o
>
>    210          err |= __put_user(temp.uint, &cmd->stop_arg);
>    211          err |= __get_user(temp.uptr, &cmd32->chanlist);
>    212          err |= __put_user(compat_ptr(temp.uptr), &cmd->chanlist);
>    213          err |= __get_user(temp.uint, &cmd32->chanlist_len);
>    214          err |= __put_user(temp.uint, &cmd->chanlist_len);
>    215          err |= __get_user(temp.uptr, &cmd32->data);
>    216          err |= __put_user(compat_ptr(temp.uptr), &cmd->data);
>    217          err |= __get_user(temp.uint, &cmd32->data_len);
>
> I'm not sure how to cast away the warnings...

Doing a new build now with CONFIG_COMPAT enabled. I'll take a
look at it then.

Regards,
Hartley

_______________________________________________
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