kernel-ark/drivers/char
Herbert Xu 55db8387a5 hwrng: via_rng - Fix memory scribbling on some CPUs
It has been reported that on at least one Nano CPU the xstore
instruction will write as many as 16 bytes of data to the output
buffer.

This causes memory corruption as we use rng->priv which is only
4-8 bytes long.

This patch fixes this by using an intermediate buffer on the stack
with at least 16 bytes and aligned to a 16-byte boundary.

The problem was observed on the following processor:

processor	: 0
vendor_id	: CentaurHauls
cpu family	: 6
model		: 15
model name	: VIA Nano processor U2250 (1.6GHz Capable)
stepping	: 3
cpu MHz		: 1600.000
cache size	: 1024 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss tm syscall nx lm constant_tsc up rep_good pni monitor vmx est tm2 ssse3 cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm
bogomips	: 3192.08
clflush size	: 64
cache_alignment	: 128
address sizes	: 36 bits physical, 48 bits virtual
power management:

Tested-by: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-01-07 14:55:06 +11:00
..
agp Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-10-26 18:57:59 -07:00
hw_random hwrng: via_rng - Fix memory scribbling on some CPUs 2011-01-07 14:55:06 +11:00
ip2 drivers/char/ip2/Makefile: replace the use of <module>-objs with <module>-y 2010-10-27 18:03:14 -07:00
ipmi drivers/char/ipmi/Makefile: replace the use of <module>-objs with <module>-y 2010-10-27 18:03:14 -07:00
mwave drivers/char/mwave/Makefile: clean up 2010-10-27 18:03:15 -07:00
pcmcia drivers/char/pcmcia/ipwireless/Makefile: Makefile: replace the use of <module>-objs with <module>-y 2010-10-27 18:03:15 -07:00
rio drivers/char/rio/Makefile: replace the use of <module>-objs with <module>-y 2010-10-27 18:03:15 -07:00
tpm Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
xilinx_hwicap Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
.gitignore
amiserial.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
apm-emulation.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
applicom.c drivers/char/applicom.c: fix information leak to userland 2010-10-27 18:03:14 -07:00
applicom.h
bfin_jtag_comm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
bfin-otp.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
briq_panel.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
bsr.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
cd1865.h
consolemap.c
cp437.uni
cs5535_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
cyclades.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1302.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
ds1620.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dsp56k.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dtlk.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
efirtc.c efirtc: explicitly set llseek to no_llseek 2009-12-16 07:19:59 -08:00
epca.c epca: Kill the big kernel lock 2010-08-10 13:47:40 -07:00
epca.h
epcaconfig.h
generic_nvram.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
generic_serial.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
genrtc.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
hangcheck-timer.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
hpet.c drivers/char/hpet.c: fix information leak to userland 2010-10-26 16:52:11 -07:00
hvc_beat.c Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-02-25 15:38:37 -08:00
hvc_console.c drivers/char/hvc_console.c: remove unneeded __set_current_state(TASK_RUNNING) 2010-10-27 18:03:14 -07:00
hvc_console.h hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_irq.c
hvc_iseries.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
hvc_iucv.c [S390] hvc_iucv: do not call iucv_unregister if iucv_register failed 2010-10-25 16:10:17 +02:00
hvc_rtas.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_tile.c char: hvc: check for error case 2010-10-14 14:48:12 -04:00
hvc_udbg.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_vio.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_xen.c xen/hvc: only notify if we actually sent something 2010-10-22 12:57:33 -07:00
hvcs.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hvsi.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
i8k.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
isicom.c isicom: kill off the BKL 2010-08-10 13:47:40 -07:00
istallion.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
Kconfig add ttyprintk driver 2010-10-22 10:20:02 -07:00
keyboard.c Input: add support for large scancodes 2010-09-09 22:00:50 -07:00
lp.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
Makefile add ttyprintk driver 2010-10-22 10:20:02 -07:00
mbcs.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
mbcs.h
mem.c vfs: introduce FMODE_UNSIGNED_OFFSET for allowing negative f_pos 2010-10-25 21:18:21 -04:00
misc.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
mmtimer.c SGI Altix IA64 mmtimer: eliminate long interval timer holdoffs 2010-10-27 18:03:14 -07:00
moxa.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
moxa.h
mspec.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
mxser.c drivers/char/mxser.c: fix compilation warning in mxser.c 2010-10-27 18:03:15 -07:00
mxser.h
n_gsm.c drivers/char/n_gsm.c: add missing spin_unlock_irqrestore 2010-08-11 08:59:20 -07:00
n_hdlc.c tty: replace BKL with a new tty_lock 2010-08-10 13:47:43 -07:00
n_r3964.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
n_tty.c tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
nozomi.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
nsc_gpio.c
nvram.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
nwbutton.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
nwbutton.h
nwflash.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
pc8736x_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ppdev.c drivers/char/ppdev.c: fix information leak to userland 2010-10-27 18:03:14 -07:00
ps3flash.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
pty.c tty: Remove __GFP_NOFAIL from tty_add_file() 2010-10-22 10:19:58 -07:00
ramoops.c ramoops: use the platform data structure instead of module params 2010-10-27 18:03:18 -07:00
random.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
raw.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
riscom8_reg.h
riscom8.c riscom8: kill use of lock_kernel 2010-08-10 13:47:40 -07:00
riscom8.h
rocket_int.h
rocket.c drivers/char/rocket.c: release_region or error path 2010-10-27 18:03:14 -07:00
rocket.h
rtc.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
scc.h
scx200_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
selection.c tty: remove tty_lock_nested 2010-08-10 13:47:44 -07:00
ser_a2232.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
snsc_event.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
snsc.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
snsc.h
sonypi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
specialix_io8.h
specialix.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
stallion.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
sx.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
sx.h
sxboards.h
sxwindow.h
synclink_gt.c drivers/char/synclink_gt.c: add extended sync feature 2010-10-27 18:03:14 -07:00
synclink.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
synclinkmp.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
sysrq.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-10-25 07:59:01 -07:00
tb0219.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
tlclk.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
toshiba.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
tty_audit.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
tty_buffer.c tty: fix obsolete comment on tty_insert_flip_string_fixed_flag 2010-05-21 09:34:30 -07:00
tty_io.c tty: Make tiocgicount a handler 2010-10-22 10:20:04 -07:00
tty_ioctl.c tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
tty_ldisc.c tty: remove tty_lock_nested 2010-08-10 13:47:44 -07:00
tty_mutex.c tty: implement BTM as mutex instead of BKL 2010-08-10 13:47:44 -07:00
tty_port.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
ttyprintk.c add ttyprintk driver 2010-10-22 10:20:02 -07:00
uv_mmtimer.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
vc_screen.c vcs: invoke the vt update callback when /dev/vcs* is written to 2010-10-22 10:20:06 -07:00
viotape.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
virtio_console.c virtio: console: Disable lseek(2) for port file operations 2010-10-21 17:44:04 +10:30
vme_scc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vt_ioctl.c drivers/char/vt_ioctl.c: fix VT_OPENQRY error value 2010-10-27 18:03:05 -07:00
vt.c vcs: invoke the vt update callback when /dev/vcs* is written to 2010-10-22 10:20:06 -07:00