09 Aug, 2014
1 commit
-
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches
Herbert Xu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 May, 2013
1 commit
-
free_irq() expects the same pointer that was passed to request_irq(), otherwise
the IRQ is not freed.The issue was found using the following coccinelle script:
@r1@
type T;
T devid;
@@
request_irq(..., devid)@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)@@
position p != r2.p;
@@
*free_irq@p(...)Signed-off-by: Lars-Peter Clausen
Signed-off-by: Herbert Xu
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Herbert Xu
Cc: "David S. Miller"
Cc: Kent Yoder
Cc: Jamie Iles
Cc: Kim Phillips
Cc: Shengzhou Liu
Cc: Alex Porosanu
Signed-off-by: Greg Kroah-Hartman
05 Oct, 2012
1 commit
-
Pull crypto update from Herbert Xu:
- Optimised AES/SHA1 for ARM.
- IPsec ESN support in talitos and caam.
- x86_64/avx implementation of cast5/cast6.
- Add/use multi-algorithm registration helpers where possible.
- Added IBM Power7+ in-Nest support.
- Misc fixes.Fix up trivial conflicts in crypto/Kconfig due to the sparc64 crypto
config options being added next to the new ARM ones.[ Side note: cut-and-paste duplicate help texts make those conflicts
harder to read than necessary, thanks to git being smart about
minimizing conflicts and maximizing the common parts... ]* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (71 commits)
crypto: x86/glue_helper - fix storing of new IV in CBC encryption
crypto: cast5/avx - fix storing of new IV in CBC encryption
crypto: tcrypt - add missing tests for camellia and ghash
crypto: testmgr - make test_aead also test 'dst != src' code paths
crypto: testmgr - make test_skcipher also test 'dst != src' code paths
crypto: testmgr - add test vectors for CTR mode IV increasement
crypto: testmgr - add test vectors for partial ctr(cast5) and ctr(cast6)
crypto: testmgr - allow non-multi page and multi page skcipher tests from same test template
crypto: caam - increase TRNG clocks per sample
crypto, tcrypt: remove local_bh_disable/enable() around local_irq_disable/enable()
crypto: tegra-aes - fix error return code
crypto: crypto4xx - fix error return code
crypto: hifn_795x - fix error return code
crypto: ux500 - fix error return code
crypto: caam - fix error IDs for SEC v5.x RNG4
hwrng: mxc-rnga - Access data via structure
hwrng: mxc-rnga - Adapt clocks to new i.mx clock framework
crypto: caam - add IPsec ESN support
crypto: 842 - remove .cra_list initialization
Revert "[CRYPTO] cast6: inline bloat--"
...
27 Sep, 2012
1 commit
-
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
//Signed-off-by: Peter Senna Tschudin
Signed-off-by: Herbert Xu
30 Jul, 2012
1 commit
-
Commit feb7b7ab928afa97a79a9c424e4e0691f49d63be changed NSEC_PER_SEC to 64-bit
constant, which causes "DIV_ROUND_UP(NSEC_PER_SEC, dev->pk_clk_freq)" to
generate __divdi3 call on 32-bit archs. Fix this by changing DIV_ROUND_UP to
DIV_ROUND_UP_ULL.Signed-off-by: Jussi Kivilinna
Acked-by: Randy Dunlap
Signed-off-by: Herbert Xu
22 Mar, 2012
1 commit
-
Pull crypto update from Herbert Xu:
"* sha512 bug fixes (already in your tree).
* SHA224/SHA384 AEAD support in caam.
* X86-64 optimised version of Camellia.
* Tegra AES support.
* Bulk algorithm registration interface to make driver registration easier.
* padata race fixes.
* Misc fixes."* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (31 commits)
padata: Fix race on sequence number wrap
padata: Fix race in the serialization path
crypto: camellia - add assembler implementation for x86_64
crypto: camellia - rename camellia.c to camellia_generic.c
crypto: camellia - fix checkpatch warnings
crypto: camellia - rename camellia module to camellia_generic
crypto: tcrypt - add more camellia tests
crypto: testmgr - add more camellia test vectors
crypto: camellia - simplify key setup and CAMELLIA_ROUNDSM macro
crypto: twofish-x86_64/i586 - set alignmask to zero
crypto: blowfish-x86_64 - set alignmask to zero
crypto: serpent-sse2 - combine ablk_*_init functions
crypto: blowfish-x86_64 - use crypto_[un]register_algs
crypto: twofish-x86_64-3way - use crypto_[un]register_algs
crypto: serpent-sse2 - use crypto_[un]register_algs
crypto: serpent-sse2 - remove dead code from serpent_sse2_glue.c::serpent_sse2_init()
crypto: twofish-x86 - Remove dead code from twofish_glue_3way.c::init()
crypto: In crypto_add_alg(), 'exact' wants to be initialized to 0
crypto: caam - fix gcc 4.6 warning
crypto: Add bulk algorithm registration interface
...
20 Mar, 2012
1 commit
-
Signed-off-by: Cong Wang
13 Jan, 2012
1 commit
-
The added CRYPTO_ALG_KERN_DRIVER_ONLY indicates whether a cipher
is only available via a kernel driver. If the cipher implementation
might be available by using an instruction set or by porting the
kernel code, then it must not be set.Signed-off-by: Nikos Mavrogiannopoulos
Signed-off-by: Herbert Xu
21 Oct, 2011
1 commit
-
hifn_795x works only on 32 bit, remove the detection while loading
the module and catch non-32 bit systems at build time.Signed-off-by: Richard Weinberger
Signed-off-by: Herbert Xu
27 Oct, 2010
1 commit
-
Use the new {max,min}3 macros to save some cycles and bytes on the stack.
This patch substitutes trivial nested macros with their counterpart.Signed-off-by: Hagen Paul Pfeifer
Cc: Joe Perches
Cc: Ingo Molnar
Cc: Hartley Sweeten
Cc: Russell King
Cc: Benjamin Herrenschmidt
Cc: Thomas Gleixner
Cc: Herbert Xu
Cc: Roland Dreier
Cc: Sean Hefty
Cc: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Oct, 2010
1 commit
-
Make hifn_795x::hifn_remove() call cancel_delayed_work_sync() instead
of calling cancel_delayed_work() followed by flush_scheduled_work().This is to prepare for the deprecation and removal of
flush_scheduled_work().Signed-off-by: Tejun Heo
Signed-off-by: Herbert Xu
14 Jul, 2010
1 commit
-
The below patch gets rid of an unused variable ctx reported by
GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used
drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not usedSigned-off-by: Justin P. Mattock
Signed-off-by: Herbert Xu
19 May, 2010
1 commit
-
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
05 Feb, 2010
1 commit
-
Some misspelled occurences of 'octet' and some comments were also fixed
as I was on it.Signed-off-by: Daniel Mack
Cc: Jiri Kosina
Cc: Joe Perches
Cc: Junio C Hamano
Signed-off-by: Jiri Kosina
04 Dec, 2009
1 commit
-
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.Signed-off-by: André Goddard Rosa
Signed-off-by: Jiri Kosina
02 Jun, 2009
1 commit
-
The remove member of the pci_driver hifn_pci_driver uses __devexit_p(),
so the remove function itself should be marked with __devexit. And where
there be __devexit on the remove, so is there __devinit on the probe.Similarly, the module_init/module_exit functions should be declared with
plain __init/__exit markings, not the hotplug __dev{init,exit} ones.Signed-off-by: Mike Frysinger
Acked-by: Evgeniy Polyakov
CC: Patrick McHardy
Signed-off-by: Herbert Xu
07 Apr, 2009
1 commit
-
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Apr, 2009
1 commit
-
It is a fairly common operation to have a pointer to a work and to need a
pointer to the delayed work it is contained in. In particular, all
delayed works which want to rearm themselves will have to do that. So it
would seem fair to offer a helper function for this operation.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jean Delvare
Acked-by: Ingo Molnar
Cc: "David S. Miller"
Cc: Herbert Xu
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: Greg KH
Cc: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Dec, 2008
8 commits
-
Use KM_SOFTIRQ instead of KM_IRQ in tasklet context.
Added bug_on on input no-page condition.Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
Fix queue management. Change ring size and perform its check not
one after another descriptor, but using stored pointers to the last
checked descriptors.Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
Signed-off-by: Patrick McHardy
Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
Signed-off-by: Patrick McHardy
Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
HIFN uses the transform context to store per-request data, which breaks
when more than one request is outstanding. Move per request members from
struct hifn_context to a new struct hifn_request_context and convert
the code to use this.Signed-off-by: Patrick McHardy
Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
Signed-off-by: Patrick McHardy
Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
Signed-off-by: Patrick McHardy
Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
On Tue, Sep 23, 2008 at 08:06:32PM +0200, Dimitri Puzin (max@psycast.de) wrote:
> With this patch applied it still doesn't work as expected. The overflow
> messages are gone however syslog shows
> [ 120.924266] hifn0: abort: c: 0, s: 1, d: 0, r: 0.
> when doing cryptsetup luksFormat as in original e-mail. At this point
> cryptsetup hangs and can't be killed with -SIGKILL. I've attached
> SysRq-t dump of this condition.Yes, I was wrong with the patch: HIFN does not support 64-bit addresses
afaics.Attached patch should not allow HIFN to be registered on 64-bit arch, so
crypto layer will fallback to the software algorithms.Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu
10 Jul, 2008
13 commits
-
Signed-off-by: Robert P. J. Day
Signed-off-by: Herbert Xu -
Removed duplicated include file .
Signed-off-by: Huang Weiyi
Signed-off-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
The descriptors need to be invalidated after processing for ring
cleanup to work properly and to avoid using an old destination
descriptor when the src and cmd descriptors are already set up
and the dst descriptor isn't.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
Move command descriptor setup to seperate function as preparation
for the following DMA setup fixes.Note 1: also fix a harmless typo while moving it: sa_idx is initialized
to dma->resi instead of dma->cmdi.Note 2: errors from command descriptor setup are not propagated back,
anymore, they can't be handled anyway and all conditions leading
to errors should be checked earlier.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
All but the last element of the command and result descriptor rings can be
used for crypto requests, fix HIFN_QUEUE_LENGTH.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
For combined modes like cbc(aes) the driver is responsible for
initializing ivsize.Signed-off-by: Patrick McHardy
Signed-off-by: Herbert Xu -
When the CryptoAPI instantiates a new algorithm, it performs a lookup
by driver name. Since hifn uses the same name for all modes of one
algorithm, the lookup may return an incorrect algorithm.Change the name to use -- to provide unique
names for the different combinations and devices.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
The scatterlist may contain more data than the crypto request, causing
an underflow of the remaining byte count while walking the list.Use the minimum of the scatterlist element size and the remaining byte
count specified in the crypto request to avoid this.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
The check for misalignment of the scatterlist data has two bugs:
- the source buffer doesn't need to be aligned at all
- the destination buffer and its size needs to be aligned to a multiple
of 4, not to the crypto alg blocksizeIntroduce symbolic constant for destination buffer alignment requirements,
use it instead of the crypto alg blocksize and remove the unnecessary
checks for source buffer alignment and change cra_alignmask to zero.Signed-off-by: Patrick McHardy
Signed-off-by: Herbert Xu -
ablkcipher_walk may return a negative error value, handle this properly
instead of treating it as a huge number of scatter-gather elements.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
hifn_setup_crypto() needs to return -EINPROGRESS on success to indicate
asynchronous processing to the crypto API. This also means it must not
return the errno code returned by hifn_process_queue(), if any.Signed-off-by: Patrick McHardy
Signed-off-by: Herbert Xu -
Without debugging this spams the log with "printk: N messages surpressed"
without any actual messages on error. With debugging its more useful to
always see the message.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu -
HIFN uses little-endian by default, move cpu_to_le32 conversion to hifn_write_0/
hifn_write_1, add sparse annotations and fix an invalid endian conversion in
hifn_setup_src_desc.Signed-off-by: Patrick McHardy
Acked-by: Evgeniy Polyakov
Signed-off-by: Herbert Xu