19 May, 2010
11 commits
-
Current deficiencies:
1) No HMAC hash support yet.
2) Although the algs are registered as ASYNC they always run
synchronously.Signed-off-by: David S. Miller
Signed-off-by: Herbert Xu -
These are akin to the blkcipher_walk helpers.
The main differences in the async variant are:
1) Only physical walking is supported. We can't hold on to
kmap mappings across the async operation to support virtual
ablkcipher_walk operations anyways.2) Bounce buffers used for async more need to be persistent and
freed at a later point in time when the async op completes.
Therefore we maintain a list of writeback buffers and require
that the ablkcipher_walk user call the 'complete' operation
so we can copy the bounce buffers out to the real buffers and
free up the bounce buffer chunks.These interfaces will be used by the new Niagara2 crypto driver.
Signed-off-by: David S. Miller
Signed-off-by: Herbert Xu -
Extend testmgr such that it tests async hash algorithms,
and that for both sync and async hashes it tests both
->digest() and ->update()/->final() sequences.Signed-off-by: David S. Miller
Signed-off-by: Herbert Xu -
These are invoked in the 'mode' range of 400 to 499.
The cost of async vs. sync for the software algorithm implementations
varies. It can be as low as 16 cycles but as much as a couple hundred.Here two runs of md5 testing, async then sync:
testing speed of async md5
test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 2448 cycles/operation, 153 cycles/byte
test 1 ( 64 byte blocks, 16 bytes per update, 4 updates): 4992 cycles/operation, 78 cycles/byte
test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 3808 cycles/operation, 59 cycles/byte
test 3 ( 256 byte blocks, 16 bytes per update, 16 updates): 14000 cycles/operation, 54 cycles/byte
test 4 ( 256 byte blocks, 64 bytes per update, 4 updates): 8480 cycles/operation, 33 cycles/byte
test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 7280 cycles/operation, 28 cycles/byte
test 6 ( 1024 byte blocks, 16 bytes per update, 64 updates): 50016 cycles/operation, 48 cycles/byte
test 7 ( 1024 byte blocks, 256 bytes per update, 4 updates): 22496 cycles/operation, 21 cycles/byte
test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 21232 cycles/operation, 20 cycles/byte
test 9 ( 2048 byte blocks, 16 bytes per update, 128 updates): 117184 cycles/operation, 57 cycles/byte
test 10 ( 2048 byte blocks, 256 bytes per update, 8 updates): 43008 cycles/operation, 21 cycles/byte
test 11 ( 2048 byte blocks, 1024 bytes per update, 2 updates): 40176 cycles/operation, 19 cycles/byte
test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 39888 cycles/operation, 19 cycles/byte
test 13 ( 4096 byte blocks, 16 bytes per update, 256 updates): 194176 cycles/operation, 47 cycles/byte
test 14 ( 4096 byte blocks, 256 bytes per update, 16 updates): 84096 cycles/operation, 20 cycles/byte
test 15 ( 4096 byte blocks, 1024 bytes per update, 4 updates): 78336 cycles/operation, 19 cycles/byte
test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 77120 cycles/operation, 18 cycles/byte
test 17 ( 8192 byte blocks, 16 bytes per update, 512 updates): 403056 cycles/operation, 49 cycles/byte
test 18 ( 8192 byte blocks, 256 bytes per update, 32 updates): 166112 cycles/operation, 20 cycles/byte
test 19 ( 8192 byte blocks, 1024 bytes per update, 8 updates): 154768 cycles/operation, 18 cycles/byte
test 20 ( 8192 byte blocks, 4096 bytes per update, 2 updates): 151904 cycles/operation, 18 cycles/byte
test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 155456 cycles/operation, 18 cycles/bytetesting speed of md5
test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 2208 cycles/operation, 138 cycles/byte
test 1 ( 64 byte blocks, 16 bytes per update, 4 updates): 5008 cycles/operation, 78 cycles/byte
test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 3600 cycles/operation, 56 cycles/byte
test 3 ( 256 byte blocks, 16 bytes per update, 16 updates): 14080 cycles/operation, 55 cycles/byte
test 4 ( 256 byte blocks, 64 bytes per update, 4 updates): 8560 cycles/operation, 33 cycles/byte
test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 7040 cycles/operation, 27 cycles/byte
test 6 ( 1024 byte blocks, 16 bytes per update, 64 updates): 50592 cycles/operation, 49 cycles/byte
test 7 ( 1024 byte blocks, 256 bytes per update, 4 updates): 22736 cycles/operation, 22 cycles/byte
test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 24960 cycles/operation, 24 cycles/byte
test 9 ( 2048 byte blocks, 16 bytes per update, 128 updates): 99312 cycles/operation, 48 cycles/byte
test 10 ( 2048 byte blocks, 256 bytes per update, 8 updates): 43520 cycles/operation, 21 cycles/byte
test 11 ( 2048 byte blocks, 1024 bytes per update, 2 updates): 40704 cycles/operation, 19 cycles/byte
test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 39552 cycles/operation, 19 cycles/byte
test 13 ( 4096 byte blocks, 16 bytes per update, 256 updates): 196720 cycles/operation, 48 cycles/byte
test 14 ( 4096 byte blocks, 256 bytes per update, 16 updates): 85152 cycles/operation, 20 cycles/byte
test 15 ( 4096 byte blocks, 1024 bytes per update, 4 updates): 79408 cycles/operation, 19 cycles/byte
test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 76816 cycles/operation, 18 cycles/byte
test 17 ( 8192 byte blocks, 16 bytes per update, 512 updates): 391520 cycles/operation, 47 cycles/byte
test 18 ( 8192 byte blocks, 256 bytes per update, 32 updates): 168464 cycles/operation, 20 cycles/byte
test 19 ( 8192 byte blocks, 1024 bytes per update, 8 updates): 156912 cycles/operation, 19 cycles/byte
test 20 ( 8192 byte blocks, 4096 bytes per update, 2 updates): 154016 cycles/operation, 18 cycles/byte
test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 153856 cycles/operation, 18 cycles/byteWe can ditch the sync hash code at some point if we feel that makes
sense. For now I've left it there.Signed-off-by: David S. Miller
Signed-off-by: Herbert Xu -
We are done with the scattergather entry when the walk offset goes
past sg->offset + sg->length, not when it crosses a page boundary.There is a similarly queer test in the second half of
scatterwalk_pagedone() that probably needs some scrutiny.Signed-off-by: David S. Miller
Signed-off-by: Herbert Xu -
This is in preparation for the generic ablkcipher_walk helpers that
will be added to the crypto layer.Signed-off-by: David S. Miller
Signed-off-by: Herbert Xu -
Add get_online_cpus/put_online_cpus to ensure that no cpu goes
offline during the flushing of the padata percpu queues.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
yield was used to wait until all references of the internal control
structure in use are dropped before it is freed. This patch implements
padata_flush_queues which actively flushes the padata percpu queues
in this case.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
padata_get_next needs to check whether the next object that
need serialization must be parallel processed by the local cpu.
This check was wrong implemented and returned always true,
so the try_again loop in padata_reorder was never taken. This
can lead to object leaks in some rare cases due to a race that
appears with the trylock in padata_reorder. The try_again loop
was not a good idea after all, because a cpu could take that
loop frequently, so we handle this with a timer instead.This patch adds a timer to handle the race that appears with
the trylock. If cpu1 queues an object to the reorder queue while
cpu2 holds the pd->lock but left the while loop in padata_reorder
already, cpu2 can't care for this object and cpu1 exits because
it can't get the lock. Usually the next cpu that takes the lock
cares for this object too. We need the timer just if this object
was the last one that arrives to the reorder queues. The timer
function sends it out in this case.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
The macro CRYPTO_MINALIGN is not meant to be used directly. This
patch replaces it with crypto_tfm_ctx_alignment.Signed-off-by: Herbert Xu
14 May, 2010
2 commits
-
Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors.Signed-off-by: Tobias Klauser
Signed-off-by: Herbert Xu -
Signed-off-by: Dmitry Kasatkin
Acked-by: Tony Lindgren
Signed-off-by: Herbert Xu
03 May, 2010
9 commits
-
This patch puts get_online_cpus/put_online_cpus around the places
we modify the padata cpumask to ensure that no cpu goes offline
during this operation.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
padata_alloc_pd set up queues for all possible cpus.
This patch changes this to set up the queues just for
the used cpus.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
might_sleep() was placed before mutex_lock() in some places.
We remove them because mutex_lock() does might_sleep() too.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
This patch makes the padata cpu hotplug code dependend on CONFIG_HOTPLUG_CPU.
Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
Scaling the maximum number of objects in the parallel
codepath can lead to out of memory problems on bigsmp
machines.Signed-off-by: Steffen Klassert
Signed-off-by: Herbert Xu -
Earlier kernel contained omap sha1 and md5 driver, which was not maintained,
was not ported to new crypto APIs and removed from the source tree.- implements async crypto API using dma and cpu.
- supports multiple sham instances if available
- hmac
- concurrent requestsSigned-off-by: Dmitry Kasatkin
Signed-off-by: Herbert Xu -
- registration with multi OMAP kernels support
- clocksSigned-off-by: Dmitry Kasatkin
Signed-off-by: Herbert Xu -
We don't check "frontend" consistently in crypto_init_spawn2(). We
check it at the start of the function but then we dereference it
unconditionally in the parameter list when we call crypto_init_spawn().I looked at the places that call crypto_init_spawn2() and "frontend" is
always a valid pointer so I removed the check for null.Signed-off-by: Dan Carpenter
Signed-off-by: Herbert Xu
01 May, 2010
18 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: vme: Re-introduce necessary brackets
Staging: iio: fix up the iio_get_new_idr_val comment
Staging: add Add Sitecom WL-349 to rtl8192su
Staging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id
staging: rtl8192su: add Support for Belkin F5D8053 v6
Staging: dt3155: fix 50Hz configuration
staging: usbip: Fix deadlock
Staging: rtl8192su: add USB ID for 0bda:8171
Staging: hv: name network device ethX rather than sethX
Staging: hv: Fix up memory leak on HvCleanup
Staging: hv: Fix a bug affecting IPv6
staging: iio: ring_sw: Fix incorrect test on successful read of last value, causes infinite loop
staging: iio: Function iio_get_new_idr_val() return negative value if fails.
Staging: iio: adc: fix dangling pointers
Staging: iio: light: fix dangling pointers
Staging: iio: test for failed allocation
staging: iio: lis3l02dq - incorrect ws used in container of call. -
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
serial: drivers/serial/pmac_zilog.c: add missing unlock
serial: 8250_pnp - add Fujitsu Wacom device
tty: Fix regressions in the char driver conversion -
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (29 commits)
USB: sl811-hcd: Fix device disconnect
USB: ohci-at91: fix power management hanging
USB: rename usb_buffer_alloc() and usb_buffer_free()
USB: ti_usb: fix printk format warning
USB: gadget: s3c-hsotg: Add missing unlock
USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set
USB: oxu210hp: release spinlock on error path
USB: serial: option: add cinterion device id
USB: serial: option: ZTEAC8710 Support with Device ID 0xffff
USB: serial: pl2303: Hybrid reader Uniform HCR331
USB: option: add ID for ZTE MF 330
USB: xhci: properly set endpoint context fields for periodic eps.
USB: xhci: properly set the "Mult" field of the endpoint context.
USB: OHCI: don't look at the root hub to get the number of ports
USB: don't choose configs with no interfaces
USB: cdc-acm: add another device quirk
USB: fix testing the wrong variable in fs_create_by_name()
usb: Fix tusb6010 for DMA API
musb_core: fix musb_init_controller() error cleanup path
MUSB: fix DaVinci glue layer dependency
... -
Correct two mishaps which prevented reporting error type (CECC vs UECC)
and extended error description.Cc: # 32.x, 33.x
Signed-off-by: Borislav Petkov
Signed-off-by: Linus Torvalds -
CONFIG_INOTIFY_USER defined but CONFIG_ANON_INODES undefined will result
in the following build failure:LD vmlinux
fs/built-in.o: In function 'sys_inotify_init1':
(.text.sys_inotify_init1+0x22c): undefined reference to 'anon_inode_getfd'
fs/built-in.o: In function `sys_inotify_init1':
(.text.sys_inotify_init1+0x22c): relocation truncated to fit: R_MIPS_26 against 'anon_inode_getfd'
make[2]: *** [vmlinux] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2Signed-off-by: Ralf Baechle
Cc: Al Viro
Signed-off-by: Linus Torvalds -
* 'merge' of git://git.secretlab.ca/git/linux-2.6:
spi: spidev_test gives error upon 1-byte transfer
omap2_mcspi: small fixes of output data format
omap2_mcspi: Flush posted writes
spi: spi_device memory should be released instead of device.
spi: release device claimed by bus_find_device_by_name
of: check for IS_ERR()
serial/mpc52xx_uart: Drop outdated comments
gpio: potential null dereference -
Somehow I managed to remove a set of rather necessary brackets in commit
29848ac9f3b33bf171439ae2d66d40e6a71446c4. Put them back.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
improve the comment a bit
Cc: Greg KH
Cc: Jonathan Cameron
Cc: Sonic Zhang
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
Add usb id of Sitecom WL-349 to rtl8192su
Signed-off-by: Rodrigo Linfati
Signed-off-by: Greg Kroah-Hartman -
Add Belkin F5D8055 Wireless-N USB support to the rt2870
staging driver.Signed-off-by: Chris Largret
Signed-off-by: Greg Kroah-Hartman -
Please find attached a patch which adds the device ID for the Belkin
F5D8053 v6 to the rtl8192su driver. I've tested this in 2.6.34-rc3
(Ubuntu 9.10 amd64) and the network adapter is working flawlessly.Signed-off-by: Richard Airlie
Signed-off-by: Greg Kroah-Hartman -
According to the header file, dt3155_io.h, the 50/60 Hz configuration
is controlled by a bit in the I2C CSR2 register (bit 2). The function
dt3155_init_isr actually reads the I2C CONFIG register into the global
I2C_CSR union variable then modifies the bit. It then does a write
to the I2C CONFIG register with the global I2C_CONFIG union variable
which is not even set with a value anywhere in the driver.My guess is 50Hz operation doesn't even work as-is.
Fix this by actually reading and writing the correct register with
the correct value.Signed-off-by: H Hartley Sweeten
Cc: Simon Horman
Signed-off-by: Greg Kroah-Hartman -
When detaching a port from the client side (usbip --detach 0),
the event thread, on the server side, is going to deadlock.
The "eh" server thread is getting USBIP_EH_RESET event and calls:
-> stub_device_reset() -> usb_reset_device()
the USB framework is then calling back _in the same "eh" thread_ :
-> stub_disconnect() -> usbip_stop_eh() -> wait_for_completion()
the "eh" thread is being asleep forever, waiting for its own completion.
This patch checks if "eh" is the current thread, in usbip_stop_eh().Signed-off-by: Eric Lescouet
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Pavel Roskin
Signed-off-by: Greg Kroah-Hartman -
This patch makes the HyperV network device use the same naming scheme as
other virtual drivers (Xen, KVM). In an ideal world, userspace tools
would not care what the name is, but some users and applications do
care. Vyatta CLI is one of the tools that does depend on what the name
is.Signed-off-by: Stephen Hemminger
Cc: Hank Janssen
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
Don't assign NULL too early
Signed-off-by: Cyrill Gorcunov
Cc: Hank Janssen
Cc: Haiyang Zhang
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
Fix a bug affecting IPv6
Added the multicast flag for proper IPv6 function.Reported-by: Toshikazu Sakai
Signed-off-by: Hank Janssen
Signed-off-by: Haiyang Zhang
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
This is a bad one. The test means that almost no reads of the last
value ever succeed! Result is an infinite loop.Another one for the 'oops' category.
Signed-off-by: Jonathan Cameron
Signed-off-by: Greg Kroah-Hartman