linux/drivers/staging
Steven Rostedt 7f55f13c2c staging: ft1000: Copy from user into correct data
While doing a ktest.pl I used a MIN_CONFIG that had STAGING enabled, and
a randconfig with CONFIG_DEBUG_STRICT_USER_COPY_CHECKS enabled caught
the following bug:

In file included from /home/rostedt/work/autotest/nobackup/linux-test.git/arch/x86/include/asm/uaccess.h:571:0,
                 from /home/rostedt/work/autotest/nobackup/linux-test.git/include/linux/poll.h:14,
                 from /home/rostedt/work/autotest/nobackup/linux-test.git/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c:32:
In function 'copy_from_user',
    inlined from 'ft1000_ChIoctl' at /home/rostedt/work/autotest/nobackup/linux-test.git/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c:702:36:
/home/rostedt/work/autotest/nobackup/linux-test.git/arch/x86/include/asm/uaccess_32.h:212:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

Looking at the code it was obvious what the problem was. The pointer
dpram_data was being allocated but the address was being written to.
Looking at the comment above the code shows that it use to write into an
element of that pointer where the '&' is appropriate. But now that it
writes to the pointer itself, we need to remove the '&' otherwise we
write over the pointer and not into the data it points to.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 11:34:06 -08:00
..
adis16255
asus_oled Staging: asus_oled: fix coding style issue in asus_oled.c 2010-11-09 16:37:17 -08:00
ath6kl Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
autofs convert get_sb_nodev() users 2010-10-29 04:16:31 -04:00
batman-adv Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
bcm Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
brcm80211 Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
comedi staging: Use vzalloc 2010-11-09 16:34:01 -08:00
cpia staging: cpia: fix camera file owner in cpia_open() 2010-11-09 13:24:12 -08:00
cptm1217 Staging: add Synaptics TM1217 Touchscreen Controller driver 2010-11-09 15:19:50 -08:00
crystalhd Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
cx25821 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2010-10-28 12:13:00 -07:00
cxt1e1 Staging: cxt1e1: multiple definition of max_mtu fix 2010-10-19 10:12:14 -07:00
dt3155v4l V4L/DVB: videobuf: add queue argument to videobuf_waiton() 2010-10-21 01:06:14 -02:00
easycap staging/easycap: Improve interface to the videodev module 2010-11-09 16:31:16 -08:00
echo
et131x
frontier Staging: frontier: fix space and * coding style issues in alphatrack.c 2010-11-09 15:55:56 -08:00
ft1000 staging: ft1000: Copy from user into correct data 2010-11-16 11:34:06 -08:00
go7007 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2010-10-28 12:13:00 -07:00
hv Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
iio staging: iio: adis16209: tuning spi delay to make hardware more stable 2010-11-09 15:46:46 -08:00
intel_sst Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
keucr Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
line6
lirc Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2010-10-28 12:13:00 -07:00
memrar llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
msm Staging: msm: Makefile: replace the use of <module>-objs with <module>-y 2010-11-09 15:17:17 -08:00
octeon Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
olpc_dcon i2c: Drivers shouldn't include <linux/i2c-id.h> 2010-11-15 22:40:38 +01:00
panel llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
phison Staging: phison: fix problem caused by libata change 2010-10-09 13:26:12 -07:00
pohmelfs pohmelfs: remove unneeded conditionals before calls to crypto_destroy_tfm wrappers. 2010-11-09 16:07:08 -08:00
quatech_usb2
quickstart Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
rt2860 Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
rt2870
rtl8187se
rtl8192e Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
rtl8192u Staging: trivial: fix typos concerning "controller" 2010-11-09 15:17:18 -08:00
rtl8712 staging: r8712u: Update TODO for sparse fixes 2010-11-10 16:28:29 -08:00
samsung-laptop
sbe-2t3e3
serqt_usb2
slicoss
sm7xx
smbfs Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-31 20:40:24 -04:00
solo6x10 Staging: solo6x10: Fix checkpatch errors and most warnings 2010-11-10 16:28:30 -08:00
speakup Staging: speakup: spk_types: trival coding style issue 2010-11-09 16:38:40 -08:00
spectra staging, spectra: Remove unnecessary casts of void ptr returning alloc function return values 2010-11-09 16:45:12 -08:00
ste_rmi4 Staging: add Synaptics RMI4 touchpad driver support 2010-11-09 15:28:08 -08:00
stradis staging: stradis: fix error handling and information leak to userland 2010-11-09 13:24:13 -08:00
ti-st
tidspbridge Revert "staging: tidspbridge: replace iommu custom for opensource implementation" 2010-11-10 18:34:44 -06:00
tm6000 [media] tm6000: bugfix set tv standards 2010-11-09 15:03:20 -02:00
udlfb Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
usbip Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
vme
vt6655 Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
vt6656 Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
westbridge Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
winbond Staging: w35und: Kill struct hwdata ->SurpriseRemoveCount 2010-11-09 16:07:01 -08:00
wlags49_h2 staging, wlags49_h2: Remove unnecessary casts of void ptr returning alloc function return values 2010-11-09 16:44:47 -08:00
wlags49_h25
wlan-ng Staging: Merge 2.6.37-rc2 into staging-next 2010-11-16 10:44:50 -08:00
xgifb staging: Use vzalloc 2010-11-09 16:34:01 -08:00
zram staging: Use vzalloc 2010-11-09 16:34:01 -08:00
Kconfig Staging: add Synaptics RMI4 touchpad driver support 2010-11-09 15:28:08 -08:00
Makefile Staging: add Synaptics RMI4 touchpad driver support 2010-11-09 15:28:08 -08:00
staging.c