pandora-kernel.git
17 years ago[MTD] physmap: add power management support
Lennert Buytenhek [Thu, 21 Sep 2006 21:16:48 +0000 (23:16 +0200)]
[MTD] physmap: add power management support

Implement PM handling for physmap.  Idea from Steven Scholz, patch
by David Anders.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoioremap balanced with iounmap for drivers/mtd subsystem
Amol Lad [Thu, 21 Sep 2006 12:42:43 +0000 (18:12 +0530)]
ioremap balanced with iounmap for drivers/mtd subsystem

ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Tested (compilation only) with:
- allmodconfig
- Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to
make sure that the changed file is compiling without warning

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] Switch to pci_get_device and do ref counting
Alan Cox [Fri, 22 Sep 2006 09:19:20 +0000 (10:19 +0100)]
[MTD] Switch to pci_get_device and do ref counting

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] blkdev helper code: fix printk format warning
Randy Dunlap [Fri, 22 Sep 2006 09:17:28 +0000 (10:17 +0100)]
[MTD] blkdev helper code: fix printk format warning

Fix printk format warning(s):
drivers/mtd/mtd_blkdevs.c:72: warning: long int format, different type arg (arg 2)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] Fix ixp4xx partition parsing.
Brian Walsh [Fri, 22 Sep 2006 09:16:16 +0000 (10:16 +0100)]
[MTD] Fix ixp4xx partition parsing.

If the amount of flash is not divisible by 2 then the mask in
parse_mtd_partitions would fail to work as designed.  Passing in the base
address corrects this problem.

Signed-off-by: Brian Walsh <brian@walsh.ws>
Cc: Deepak Sanexa <dsanexa@mvista.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h
Michal Piotrowski [Fri, 22 Sep 2006 09:13:46 +0000 (10:13 +0100)]
[JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h

We certainly don't need the check for Linux version > 2.5.2, and in fact
we can also live without the __ECOS check, since we can just add it back
in the eCos git tree which is automatically derived from the Linux fs/jffs2
subdirectory in the upstream git tree.

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD NAND] Remove old code in au1550nd.c
Michal Piotrowski [Fri, 22 Sep 2006 09:09:44 +0000 (10:09 +0100)]
[MTD NAND] Remove old code in au1550nd.c

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] Unlock NOR flash automatically where necessary
Håvard Skinnemoen [Fri, 22 Sep 2006 09:07:08 +0000 (10:07 +0100)]
[MTD] Unlock NOR flash automatically where necessary

Introduce the MTD_STUPID_LOCK flag which indicates that the flash chip is
always locked after power-up, so all sectors need to be unlocked before it
is usable.

If this flag is set, and the chip provides an unlock() operation,
mtd_add_device will unlock the whole MTD device if it's writeable.  This
means that non-writeable partitions will stay locked.

Set MTD_STUPID_LOCK in fixup_use_atmel_lock() so that these chips will work
as expected.

Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[POWERPC] Fix ohare IDE irq workaround on old powermacs
Benjamin Herrenschmidt [Fri, 22 Sep 2006 02:56:30 +0000 (12:56 +1000)]
[POWERPC] Fix ohare IDE irq workaround on old powermacs

Looks like a workaround for old bogus OF bitrot...  This fixes it and
hence fixes boot on some performa machines.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] EEH: Power4 systems sometimes need multiple resets.
Linas Vepstas [Thu, 21 Sep 2006 23:25:56 +0000 (18:25 -0500)]
[POWERPC] EEH: Power4 systems sometimes need multiple resets.

On detection of an EEH error, some Power4 systems seem to occasionally
want to be reset twice before they report themselves as fully recovered.
This patch re-arranges the code to attempt additional resets if the first
one doesn't take.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.
Scott Wood [Thu, 21 Sep 2006 18:11:52 +0000 (13:11 -0500)]
[POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.

This patch causes fsl_soc.h to import the definition of phys_addr_t
itself, rather than relying on its includer to do so.

Signed-off-by: Scott Wood <scott@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c
Nathan Lynch [Thu, 21 Sep 2006 19:31:13 +0000 (14:31 -0500)]
[POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c

Noticed that the U3_*CFA macros have some typos:

#define U3_HT_CFA0(devfn, off) \
((((unsigned long)devfn) << 8) | offset)

(refers to offset rather than off)

#define U3_AGP_CFA0(devfn, off) \
((1 << (unsigned long)PCI_SLOT(dev_fn)) \
| (((unsigned long)PCI_FUNC(dev_fn)) << 8) \

(refers to dev_fn rather than devfn)

Things happen to work, but there doesn't seem to be any reason these
shouldn't be functions.  Overall behavior should be unchanged.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Maple U3 HT - reject inappropriate config space access
Nathan Lynch [Thu, 21 Sep 2006 19:25:34 +0000 (14:25 -0500)]
[POWERPC] Maple U3 HT - reject inappropriate config space access

When there is a PCI-X mode 2 capable device behind the HT<->PCI-X
bridge, the pci core decides that the device has the extended 4K
config space, even though the bus is not operating in mode 2.  This is
because the u3_ht pci ops silently accept offsets greater than 255 but
use only the 8 least significant bits, which means reading at offset
0x100 gets the data at offset 0x0, and causes confusion for lspci.

Reject accesses to configuration space offsets greater than 255.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix IPIC pending register assignments
Scott Wood [Thu, 21 Sep 2006 18:10:51 +0000 (13:10 -0500)]
[POWERPC] Fix IPIC pending register assignments

This patch fixes the assignment of pending registers to IRQ numbers for
the IPIC; the code previously assigned all IRQs to the high pending word
regardless of which word the interrupt belonged to.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] powerpc: fix building gdb against asm/ptrace.h
Arnd Bergmann [Thu, 21 Sep 2006 10:29:51 +0000 (12:29 +0200)]
[POWERPC] powerpc: fix building gdb against asm/ptrace.h

Ulrich Weigand found a bug with the current version of the
asm-powerpc/ptrace.h that prevents building at least the
SPU target version of gdb, since some ptrace opcodes are
not defined.

The problem seems to have originated in the merging of 32 and
64 bit versions of that file, the problem is that some opcodes
are only valid on 64 bit kernels, but are also used by 32 bit
programs, so they can't depends on the __powerpc64__ symbol.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove DISCONTIGMEM cruft from page.h
Michael Ellerman [Thu, 21 Sep 2006 08:21:35 +0000 (18:21 +1000)]
[POWERPC] Remove DISCONTIGMEM cruft from page.h

This looks like cruft to me, these functions don't exist AFAICT,
and I can't see that it's possible to even enable DISCONTIGMEM on
powerpc anymore. CC'ing some folks who might know better, based on
the who-touched-it-last principle.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Merge iSeries i/o operations with the rest
Stephen Rothwell [Thu, 21 Sep 2006 08:00:00 +0000 (18:00 +1000)]
[POWERPC] Merge iSeries i/o operations with the rest

This patch changes the io operations so that they are out of line if
CONFIG_PPC_ISERIES is set and includes a firmware feature check in
that case.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[CIFS] statfs for cifs unix extensions no longer experimental
Steve French [Fri, 22 Sep 2006 01:14:52 +0000 (01:14 +0000)]
[CIFS] statfs for cifs unix extensions no longer experimental

Signed-off-by: Steve French <sfrench@us.ibm.com>
17 years ago[POWERPC] 40x: Fix debug status register defines
Josh Boyer [Wed, 20 Sep 2006 14:11:59 +0000 (09:11 -0500)]
[POWERPC] 40x: Fix debug status register defines

This fixes some debug register defines on PPC 40x that were incorrect.

Signed-off-by: Josh Boyer <jdub@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix compile error in sbc8560
Amy Fong [Tue, 19 Sep 2006 03:07:24 +0000 (23:07 -0400)]
[POWERPC] Fix compile error in sbc8560

The following fixes compile errors in sbc8560.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] EEH: support MMIO enable recovery step
Linas Vepstas [Fri, 15 Sep 2006 23:58:59 +0000 (18:58 -0500)]
[POWERPC] EEH: support MMIO enable recovery step

Update to the PowerPC PCI error recovery code.

Add code to enable MMIO if a device driver reports that it is capable
of recovering on its own.  One anticipated use of this having a device
driver enable MMIO so that it can take a register dump, which might
then be followed by the device driver requesting a full reset.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] EEH: enable MMIO/DMA on frozen slot
Linas Vepstas [Fri, 15 Sep 2006 23:57:42 +0000 (18:57 -0500)]
[POWERPC] EEH: enable MMIO/DMA on frozen slot

Add wrapper around the rtas call to enable MMIO or DMA on a frozen pci
slot.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] EEH: code comment cleanup
Linas Vepstas [Fri, 15 Sep 2006 23:56:35 +0000 (18:56 -0500)]
[POWERPC] EEH: code comment cleanup

Clean up subroutine documentation; mostly formatting changes, with
some new content.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] EEH: balance pcidev_get/put calls
Linas Vepstas [Fri, 15 Sep 2006 23:55:34 +0000 (18:55 -0500)]
[POWERPC] EEH: balance pcidev_get/put calls

This corrects a pci_dev get/put imbalance that can occur only in
highly unlikely situations (kmalloc failures, pci devices with
overlapping resource addresses).  No actual failures seen, this was
spotted during code review.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] PPC: Fix xmon stack frame address in backtrace
Josh Boyer [Fri, 15 Sep 2006 19:53:10 +0000 (14:53 -0500)]
[POWERPC] PPC: Fix xmon stack frame address in backtrace

The stack frame address was being printed incorrectly in the backtrace
option of XMON on PPC.  This patch fixes it to print the actual stack
address instead of the address of the local variable that contains it.

Signed-off-by: Josh Boyer <jdub@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX
Peter Bergner [Thu, 14 Sep 2006 19:18:38 +0000 (14:18 -0500)]
[POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX

Jakub noticed the cputable.c entry for Xilinx Virtex-4 FX was missing
a .platform value, so the AT_PLATFORM value wouldn't be set correctly.
This adds it.

Signed-off-by: Peter Bergner <bergner@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[CIFS] New POSIX locking code not setting rc properly to zero on successful
Steve French [Thu, 21 Sep 2006 07:35:29 +0000 (07:35 +0000)]
[CIFS] New POSIX locking code not setting rc properly to zero on successful
unlock in case where server does not support POSIX locks and nobrl is
not specified.

Signed-off-by: Steve French <sfrench@us.ibm.com>
17 years ago[CIFS] Support deep tree mounts (e.g. mounts to //server/share/path)
Steve French [Thu, 21 Sep 2006 07:02:52 +0000 (07:02 +0000)]
[CIFS] Support deep tree mounts (e.g. mounts to //server/share/path)

Samba bugzilla #4040

Signed-off-by: Steve French <sfrench@us.ibm.com>
17 years ago[netdrvr] mv643xx_eth: fix obvious typo, which caused build breakage
Jeff Garzik [Thu, 21 Sep 2006 04:08:10 +0000 (00:08 -0400)]
[netdrvr] mv643xx_eth: fix obvious typo, which caused build breakage

The last minute fix submitted by the author fixed a bug, but
broke the driver build.

Noticed by Al Viro, since I can't build on said platform.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[netdrvr] lp486e: fix typo
Jeff Garzik [Thu, 21 Sep 2006 04:06:21 +0000 (00:06 -0400)]
[netdrvr] lp486e: fix typo

inside #if 0'd code, but it bugged me.

Really, we should probably just delete the driver.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[BLOCK] dm-crypt: trivial comment improvements
Rik Snel [Sat, 2 Sep 2006 08:17:33 +0000 (18:17 +1000)]
[BLOCK] dm-crypt: trivial comment improvements

Just some minor comment nits.

- little-endian is better than low-endian
- and since it is called essiv everywere it should also be essiv
  in the comments (and not ess_iv)

Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Deprecate crypto_digest_* and crypto_alg_available
Herbert Xu [Sat, 26 Aug 2006 08:44:31 +0000 (18:44 +1000)]
[CRYPTO] api: Deprecate crypto_digest_* and crypto_alg_available

This patch marks the crypto_digest_* functions and crypto_alg_available
as deprecated.  They've been replaced by crypto_hash_* and crypto_has_*
respectively.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Convert padlock-sha to use crypto_hash
Herbert Xu [Sat, 26 Aug 2006 08:34:10 +0000 (18:34 +1000)]
[CRYPTO] padlock: Convert padlock-sha to use crypto_hash

This patch converts padlock-sha to use crypto_hash for its fallback.
It also changes the fallback selection to use selection by type instead
of name.  This is done through the new CRYPTO_ALG_NEED_FALLBACK bit,
which is set if and only if an algorithm needs a fallback of the same
type.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] users: Use crypto_comp and crypto_has_*
Herbert Xu [Sat, 26 Aug 2006 08:12:40 +0000 (18:12 +1000)]
[CRYPTO] users: Use crypto_comp and crypto_has_*

This patch converts all users to use the new crypto_comp type and the
crypto_has_* functions.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Add crypto_comp and crypto_has_*
Herbert Xu [Sat, 26 Aug 2006 07:35:45 +0000 (17:35 +1000)]
[CRYPTO] api: Add crypto_comp and crypto_has_*

This patch adds the crypto_comp type to complete the compile-time checking
conversion.  The functions crypto_has_alg and crypto_has_cipher, etc. are
also added to replace crypto_alg_available.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] users: Use crypto_hash interface instead of crypto_digest
Herbert Xu [Thu, 24 Aug 2006 09:10:20 +0000 (19:10 +1000)]
[CRYPTO] users: Use crypto_hash interface instead of crypto_digest

This patch converts all remaining crypto_digest users to use the new
crypto_hash interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[SCSI] iscsi: Use crypto_hash interface instead of crypto_digest
Herbert Xu [Thu, 24 Aug 2006 08:45:50 +0000 (18:45 +1000)]
[SCSI] iscsi: Use crypto_hash interface instead of crypto_digest

This patch converts ISCSI to use the new crypto_hash interface instead
of crypto_digest.  It's a fairly straightforward substitution.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] digest: Remove old HMAC implementation
Herbert Xu [Sun, 20 Aug 2006 05:25:22 +0000 (15:25 +1000)]
[CRYPTO] digest: Remove old HMAC implementation

This patch removes the old HMAC implementation now that nobody uses it
anymore.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] doc: Update documentation for hash and me
Herbert Xu [Sun, 20 Aug 2006 05:17:04 +0000 (15:17 +1000)]
[CRYPTO] doc: Update documentation for hash and me

This patch updates the documentation to reflect the switch from digest
to hash.  It also replaces notes about emailing James Morris to refer
to me instead.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[SCTP]: Use HMAC template and hash interface
Herbert Xu [Sun, 20 Aug 2006 05:07:14 +0000 (15:07 +1000)]
[SCTP]: Use HMAC template and hash interface

This patch converts SCTP to use the new HMAC template and hash interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPSEC]: Use HMAC template and hash interface
Herbert Xu [Sun, 20 Aug 2006 04:24:50 +0000 (14:24 +1000)]
[IPSEC]: Use HMAC template and hash interface

This patch converts IPsec to use the new HMAC template.  The names of
existing simple digest algorithms may still be used to refer to their
HMAC composites.

The same structure can be used by other MACs such as AES-XCBC-MAC.

This patch also switches from the digest interface to hash.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] tcrypt: Use HMAC template and hash interface
Herbert Xu [Sat, 19 Aug 2006 11:38:49 +0000 (21:38 +1000)]
[CRYPTO] tcrypt: Use HMAC template and hash interface

This patch converts tcrypt to use the new HMAC template rather than the
hard-coded version of HMAC.  It also converts all digest users to use
the new cipher interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] hmac: Add crypto template implementation
Herbert Xu [Mon, 21 Aug 2006 10:50:52 +0000 (20:50 +1000)]
[CRYPTO] hmac: Add crypto template implementation

This patch rewrites HMAC as a crypto template.  This means that HMAC is no
longer a hard-coded part of the API.  It's now a template that generates
standard digest algorithms like any other.

The old HMAC is preserved until all current users are converted.

The same structure can be used by other MACs such as AES-XCBC-MAC.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] digest: Added user API for new hash type
Herbert Xu [Sat, 19 Aug 2006 12:24:23 +0000 (22:24 +1000)]
[CRYPTO] digest: Added user API for new hash type

The existing digest user interface is inadequate for support asynchronous
operations.  For one it doesn't return a value to indicate success or
failure, nor does it take a per-operation descriptor which is essential
for the issuing of requests while other requests are still outstanding.

This patch is the first in a series of steps to remodel the interface
for asynchronous operations.

For the ease of transition the new interface will be known as "hash"
while the old one will remain as "digest".

This patch also changes sg_next to allow chaining.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Mark parts of cipher interface as deprecated
Herbert Xu [Mon, 21 Aug 2006 11:40:49 +0000 (21:40 +1000)]
[CRYPTO] api: Mark parts of cipher interface as deprecated

Mark the parts of the cipher interface that have been replaced by
block ciphers as deprecated.  Thanks to Andrew Morton for suggesting
doing this before removing them completely.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argument
Herbert Xu [Mon, 14 Aug 2006 13:11:53 +0000 (23:11 +1000)]
[PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argument

This patch adds a const modifier to the buf argument of sg_set_buf and
sg_init_one.  This lets people call it with pointers that are const.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] drivers: Remove obsolete block cipher operations
Herbert Xu [Sat, 5 Aug 2006 06:28:19 +0000 (16:28 +1000)]
[CRYPTO] drivers: Remove obsolete block cipher operations

This patch removes obsolete block operations of the simple cipher type
from drivers.  These were preserved so that existing users can make a
smooth transition.  Now that the transition is complete, they are no
longer needed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] users: Use block ciphers where applicable
Herbert Xu [Tue, 22 Aug 2006 10:36:13 +0000 (20:36 +1000)]
[CRYPTO] users: Use block ciphers where applicable

This patch converts all remaining users to use the new block cipher type
where applicable.  It also changes all simple cipher operations to use
the new encrypt_one/decrypt_one interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[SUNRPC] GSS: Use block ciphers where applicable
Herbert Xu [Tue, 22 Aug 2006 10:33:54 +0000 (20:33 +1000)]
[SUNRPC] GSS: Use block ciphers where applicable

This patch converts SUNRPC/GSS to use the new block cipher type where
applicable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[IPSEC] ESP: Use block ciphers where applicable
Herbert Xu [Sun, 30 Jul 2006 05:41:01 +0000 (15:41 +1000)]
[IPSEC] ESP: Use block ciphers where applicable

This patch converts IPSec/ESP to use the new block cipher type where
applicable.  Similar to the HMAC conversion, existing algorithm names
have been kept for compatibility.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[IPSEC]: Add compatibility algorithm name support
Herbert Xu [Sat, 12 Aug 2006 22:50:00 +0000 (08:50 +1000)]
[IPSEC]: Add compatibility algorithm name support

This patch adds a compatibility name field for each IPsec algorithm.  This
is needed when parameterised algorithms are used.  For example, "md5" will
become "hmac(md5)", and "aes" will become "cbc(aes)".

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[BLOCK] dm-crypt: Use block ciphers where applicable
Herbert Xu [Tue, 22 Aug 2006 10:29:17 +0000 (20:29 +1000)]
[BLOCK] dm-crypt: Use block ciphers where applicable

This patch converts dm-crypt to use the new block cipher type where
applicable.  It also changes simple cipher operations to use the new
encrypt_one/decrypt_one interface.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[BLOCK] cryptoloop: Use block ciphers where applicable
Herbert Xu [Thu, 21 Sep 2006 01:45:53 +0000 (11:45 +1000)]
[BLOCK] cryptoloop: Use block ciphers where applicable

This patch converts cryptoloop to use the new block cipher type where
applicable.  As a result the ECB-specific and CBC-specific transfer
functions have been merged.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] tcrypt: Use block ciphers where applicable
Herbert Xu [Sat, 12 Aug 2006 22:26:09 +0000 (08:26 +1000)]
[CRYPTO] tcrypt: Use block ciphers where applicable

This patch converts tcrypt to use the new block cipher type where
applicable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] s390: Added block cipher versions of CBC/ECB
Herbert Xu [Mon, 21 Aug 2006 11:39:24 +0000 (21:39 +1000)]
[CRYPTO] s390: Added block cipher versions of CBC/ECB

This patch adds block cipher algorithms for S390.  Once all users of the
old cipher type have been converted the existing CBC/ECB non-block cipher
operations will be removed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Added block cipher versions of CBC/ECB
Herbert Xu [Mon, 21 Aug 2006 11:38:42 +0000 (21:38 +1000)]
[CRYPTO] padlock: Added block cipher versions of CBC/ECB

This patch adds block cipher algorithms for cbc(aes) and ecb(aes) for
the PadLock device.  Once all users to the old cipher type have been
converted the old cbc/ecb PadLock operations will be removed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] cipher: Added block ciphers for CBC/ECB
Herbert Xu [Thu, 21 Sep 2006 01:44:08 +0000 (11:44 +1000)]
[CRYPTO] cipher: Added block ciphers for CBC/ECB

This patch adds two block cipher algorithms, CBC and ECB.  These
are implemented as templates on top of existing single-block cipher
algorithms.  They invoke the single-block cipher through the new
encrypt_one/decrypt_one interface.

This also optimises the in-place encryption and decryption to remove
the cost of an IV copy each round.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] cipher: Added block cipher type
Herbert Xu [Mon, 21 Aug 2006 14:07:53 +0000 (00:07 +1000)]
[CRYPTO] cipher: Added block cipher type

This patch adds the new type of block ciphers.  Unlike current cipher
algorithms which operate on a single block at a time, block ciphers
operate on an arbitrarily long linear area of data.  As it is block-based,
it will skip any data remaining at the end which cannot form a block.

The block cipher has one major difference when compared to the existing
block cipher implementation.  The sg walking is now performed by the
algorithm rather than the cipher mid-layer.  This is needed for drivers
that directly support sg lists.  It also improves performance for all
algorithms as it reduces the total number of indirect calls by one.

In future the existing cipher algorithm will be converted to only have
a single-block interface.  This will be done after all existing users
have switched over to the new block cipher type.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] scatterwalk: Prepare for block ciphers
Herbert Xu [Sat, 12 Aug 2006 11:56:17 +0000 (21:56 +1000)]
[CRYPTO] scatterwalk: Prepare for block ciphers

This patch prepares the scatterwalk code for use by the new block cipher
type.

Firstly it halves the size of scatter_walk on 32-bit platforms.  This
is important as we allocate at least two of these objects on the stack
for each block cipher operation.

It also exports the symbols since the block cipher code can be built as
a module.

Finally there is a hack in scatterwalk_unmap that relies on progress
being made.  Unfortunately, for hardware crypto we can't guarantee
progress to be made since the hardware can fail.

So this also gets rid of the hack by not advancing the address returned
by scatterwalk_map.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] cipher: Added encrypt_one/decrypt_one
Herbert Xu [Sun, 13 Aug 2006 10:58:18 +0000 (20:58 +1000)]
[CRYPTO] cipher: Added encrypt_one/decrypt_one

This patch adds two new operations for the simple cipher that encrypts or
decrypts a single block at a time.  This will be the main interface after
the existing block operations have moved over to the new block ciphers.

It also adds the crypto_cipher type which is currently only used on the
new operations but will be extended to setkey as well once existing users
have been converted to use block ciphers where applicable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Added crypto_type support
Herbert Xu [Mon, 21 Aug 2006 14:06:54 +0000 (00:06 +1000)]
[CRYPTO] api: Added crypto_type support

This patch adds the crypto_type structure which will be used for all new
crypto algorithm types, beginning with block ciphers.

The primary purpose of this abstraction is to allow different crypto_type
objects for crypto algorithms of the same type, in particular, there will
be a different crypto_type objects for asynchronous algorithms.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Feed flag directly to crypto_yield
Herbert Xu [Sun, 30 Jul 2006 01:53:45 +0000 (11:53 +1000)]
[CRYPTO] api: Feed flag directly to crypto_yield

The sleeping flag used to determine whether crypto_yield can actually
yield is really a per-operation flag rather than a per-tfm flag.  This
patch changes crypto_yield to take a flag directly so that we can start
using a per-operation flag instead the tfm flag.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Added crypto_alloc_base
Herbert Xu [Sun, 30 Jul 2006 01:53:01 +0000 (11:53 +1000)]
[CRYPTO] api: Added crypto_alloc_base

Up until now all crypto transforms have been of the same type, struct
crypto_tfm, regardless of whether they are ciphers, digests, or other
types.  As a result of that, we check the types at run-time before
each crypto operation.

This is rather cumbersome.  We could instead use different C types for
each crypto type to ensure that the correct types are used at compile
time.  That is, we would have crypto_cipher/crypto_digest instead of
just crypto_tfm.  The appropriate type would then be required for the
actual operations such as crypto_digest_digest.

Now that we have the type/mask fields when looking up algorithms, it
is easy to request for an algorithm of the precise type that the user
wants.  However, crypto_alloc_tfm currently does not expose these new
attributes.

This patch introduces the function crypto_alloc_base which will carry
these new parameters.  It will be renamed to crypto_alloc_tfm once
all existing users have been converted.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] s390: Added missing driver name and priority
Herbert Xu [Mon, 21 Aug 2006 11:18:50 +0000 (21:18 +1000)]
[CRYPTO] s390: Added missing driver name and priority

Accelerated versions of crypto algorithms must carry a distinct driver name
and priority in order to distinguish themselves from their generic counter-
part.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Added asynchronous flag
Herbert Xu [Sun, 6 Aug 2006 13:12:59 +0000 (23:12 +1000)]
[CRYPTO] api: Added asynchronous flag

This patch adds the asynchronous flag and changes all existing users to
only look up algorithms that are synchronous.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Add common instance initialisation code
Herbert Xu [Sun, 6 Aug 2006 13:10:45 +0000 (23:10 +1000)]
[CRYPTO] api: Add common instance initialisation code

This patch adds the helpers crypto_get_attr_alg and crypto_alloc_instance
which can be used by simple one-argument templates like hmac to process
input parameters and allocate instances.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] cipher: Removed special IV checks for ECB
Herbert Xu [Fri, 14 Jul 2006 00:42:27 +0000 (10:42 +1000)]
[CRYPTO] cipher: Removed special IV checks for ECB

This patch makes IV operations on ECB fail through nocrypt_iv rather than
calling BUG().  This is needed to generalise CBC/ECB using the template
mechanism.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] tcrypt: Use test_hash for crc32c
Herbert Xu [Mon, 21 Aug 2006 12:04:03 +0000 (22:04 +1000)]
[CRYPTO] tcrypt: Use test_hash for crc32c

Now that crc32c has been fixed to conform with standard digest semantics,
we can use test_hash for it.  I've turned the last test into a chunky
test.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] digest: Store temporary digest in tfm
Herbert Xu [Sun, 9 Jul 2006 04:49:42 +0000 (14:49 +1000)]
[CRYPTO] digest: Store temporary digest in tfm

When the final result location is unaligned, we store the digest in a
temporary buffer before copying it to the final location.  Currently
that buffer sits on the stack.  This patch moves it to an area in the
tfm, just like the CBC IV buffer.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Get rid of flags argument to setkey
Herbert Xu [Sun, 13 Aug 2006 04:16:39 +0000 (14:16 +1000)]
[CRYPTO] api: Get rid of flags argument to setkey

Now that the tfm is passed directly to setkey instead of the ctx, we no
longer need to pass the &tfm->crt_flags pointer.

This patch also gets rid of a few unnecessary checks on the key length
for ciphers as the cipher layer guarantees that the key length is within
the bounds specified by the algorithm.

Rather than testing dia_setkey every time, this patch does it only once
during crypto_alloc_tfm.  The redundant check from crypto_digest_setkey
is also removed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] crc32c: Fix unconventional setkey usage
Herbert Xu [Sun, 6 Aug 2006 13:03:08 +0000 (23:03 +1000)]
[CRYPTO] crc32c: Fix unconventional setkey usage

The convention for setkey is that once it is set it should not change,
in particular, init must not wipe out the key set by it.  In fact, init
should always be used after setkey before any digestion is performed.

The only user of crc32c that sets the key is tcrypt.  This patch adds
the necessary init calls there.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock-sha: TFMs don't need to be static
Michal Ludvig [Sun, 16 Jul 2006 22:14:58 +0000 (08:14 +1000)]
[CRYPTO] padlock-sha: TFMs don't need to be static

TFMs are local variables. No need to declare them
static. After all one is enough.

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Helper module padlock.ko
Michal Ludvig [Sun, 6 Aug 2006 12:50:30 +0000 (22:50 +1000)]
[CRYPTO] padlock: Helper module padlock.ko

Compile a helper module padlock.ko that will try
to autoload all configured padlock algorithms.

This also provides backward compatibility with
the ancient times before padlock.ko was renamed
to padlock-aes.ko

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock-sha: Make 2 functions static
Adrian Bunk [Sat, 15 Jul 2006 01:31:25 +0000 (11:31 +1000)]
[CRYPTO] padlock-sha: Make 2 functions static

This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Driver for SHA1 / SHA256 algorithms
Michal Ludvig [Wed, 12 Jul 2006 02:29:38 +0000 (12:29 +1000)]
[CRYPTO] padlock: Driver for SHA1 / SHA256 algorithms

Support for SHA1 / SHA256 algorithms in VIA C7 processors.

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Update private header file
Michal Ludvig [Sat, 15 Jul 2006 00:23:49 +0000 (10:23 +1000)]
[CRYPTO] padlock: Update private header file

PADLOCK_CRA_PRIORITY is shared between padlock-aes and padlock-sha
so it should be in the header.

On the other hand "struct cword" is only used in padlock-aes.c
so it's unnecessary to have it in padlock.h

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Add compatibility alias after rename
Herbert Xu [Sun, 9 Jul 2006 00:35:49 +0000 (10:35 +1000)]
[CRYPTO] padlock: Add compatibility alias after rename

Whenever we rename modules we should add an alias to ensure that existing
users can still locate the new module.

This patch also gets rid of the now unused module function prototypes from
padlock.h.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] padlock: Get rid of padlock-generic.c
Michal Ludvig [Sun, 6 Aug 2006 12:46:20 +0000 (22:46 +1000)]
[CRYPTO] padlock: Get rid of padlock-generic.c

Merge padlock-generic.c into padlock-aes.c and compile
AES as a standalone module. We won't make a monolithic
padlock.ko with all supported algorithms, instead we'll
compile each driver into its own module.

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Add missing accessors for new crypto_alg fields
Michal Ludvig [Sat, 8 Jul 2006 23:02:24 +0000 (09:02 +1000)]
[CRYPTO] api: Add missing accessors for new crypto_alg fields

Add missing accessors for cra_driver_name and cra_priority.

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] sha: Add module aliases for sha1 / sha256
Michal Ludvig [Sat, 8 Jul 2006 22:59:38 +0000 (08:59 +1000)]
[CRYPTO] sha: Add module aliases for sha1 / sha256

Crypto modules should be loadable by their .cra_driver_name, so
we should make MODULE_ALIAS()es with these names. This patch adds
aliases for SHA1 and SHA256 only as that's what we need for
PadLock-SHA driver.

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Added spawns
Herbert Xu [Thu, 21 Sep 2006 01:39:29 +0000 (11:39 +1000)]
[CRYPTO] api: Added spawns

Spawns lock a specific crypto algorithm in place.  They can then be used
with crypto_spawn_tfm to allocate a tfm for that algorithm.  When the base
algorithm of a spawn is deregistered, all its spawns will be automatically
removed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] api: Allow algorithm lookup by type
Herbert Xu [Thu, 21 Sep 2006 01:35:17 +0000 (11:35 +1000)]
[CRYPTO] api: Allow algorithm lookup by type

This patch also adds the infrastructure to pick an algorithm based on
their type.  For example, this allows you to select the encryption
algorithm "aes", instead of any algorithm registered under the name
"aes".  For now this is only accessible internally.  Eventually it
will be made available through crypto_alloc_tfm.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] api: Add cryptomgr
Herbert Xu [Thu, 21 Sep 2006 01:31:44 +0000 (11:31 +1000)]
[CRYPTO] api: Add cryptomgr

The cryptomgr module is a simple manager of crypto algorithm instances.
It ensures that parameterised algorithms of the type tmpl(alg) (e.g.,
cbc(aes)) are always created.

This is meant to satisfy the needs for most users.  For more complex
cases such as deeper combinations or multiple parameters, a netlink
module will be created which allows arbitrary expressions to be parsed
in user-space.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] api: Added event notification
Herbert Xu [Sun, 6 Aug 2006 11:23:26 +0000 (21:23 +1000)]
[CRYPTO] api: Added event notification

This patch adds a notifier chain for algorithm/template registration events.
This will be used to register compound algorithms such as cbc(aes).  In
future this will also be passed onto user-space through netlink.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] api: Add template registration
Herbert Xu [Sun, 6 Aug 2006 11:16:34 +0000 (21:16 +1000)]
[CRYPTO] api: Add template registration

A crypto_template generates a crypto_alg object when given a set of
parameters.  this patch adds the basic data structure fo templates
and code to handle their registration/deregistration.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] api: Split out low-level API
Herbert Xu [Mon, 21 Aug 2006 11:08:13 +0000 (21:08 +1000)]
[CRYPTO] api: Split out low-level API

The crypto API is made up of the part facing users such as IPsec and the
low-level part which is used by cryptographic entities such as algorithms.
This patch splits out the latter so that the two APIs are more clearly
delineated.  As a bonus the low-level API can now be modularised if all
algorithms are built as modules.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[IPSEC]: Move linux/crypto.h inclusion out of net/xfrm.h
Herbert Xu [Sun, 6 Aug 2006 09:49:12 +0000 (19:49 +1000)]
[IPSEC]: Move linux/crypto.h inclusion out of net/xfrm.h

The header file linux/crypto.h is only needed by a few files so including
it in net/xfrm.h (which is included by half of the networking stack) is a
waste.  This patch moves it out of net/xfrm.h and into the specific header
files that actually need it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Add crypto_alg reference counting
Herbert Xu [Sun, 6 Aug 2006 10:28:44 +0000 (20:28 +1000)]
[CRYPTO] api: Add crypto_alg reference counting

Up until now we've relied on module reference counting to ensure that the
crypto_alg structures don't disappear from under us.  This was good enough
as long as each crypto_alg came from exactly one module.

However, with parameterised crypto algorithms a crypto_alg object may need
two or more modules to operate.  This means that we need to count the
references to the crypto_alg object directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] api: Rename crypto_alg_get to crypto_mod_get
Herbert Xu [Sat, 27 May 2006 23:05:24 +0000 (09:05 +1000)]
[CRYPTO] api: Rename crypto_alg_get to crypto_mod_get

The functions crypto_alg_get and crypto_alg_put operates on the crypto
modules rather than the algorithms.  Therefore it makes sense to call
them crypto_mod_get and crypto_alg_put respectively.

This is needed because we need to have real algorithm reference counters
for parameterised algorithms as they can be unregistered from below by
when their parameter algorithms are themselves unregistered.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] twofish: x86-64 assembly version
Joachim Fritschi [Tue, 20 Jun 2006 11:12:02 +0000 (21:12 +1000)]
[CRYPTO] twofish: x86-64 assembly version

The patch passed the trycpt tests and automated filesystem tests.
This rewrite resulted in some nice perfomance increase over my last patch.

Short summary of the tcrypt benchmarks:

Twofish Assembler vs. Twofish C (256bit 8kb block CBC)
encrypt: -27% Cycles
decrypt: -23% Cycles

Twofish Assembler vs. AES Assembler (128bit 8kb block CBC)
encrypt: +18%  Cycles
decrypt: +15% Cycles

Twofish Assembler vs. AES Assembler (256bit 8kb block CBC)
encrypt: -9% Cycles
decrypt: -8% Cycles

Full Output:
http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-c-x86_64.txt
http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-asm-x86_64.txt
http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-aes-asm-x86_64.txt

Here is another bonnie++ benchmark with encrypted filesystems. Most runs maxed
out the hd. It should give some idea what the module can do for encrypted filesystem
performance even though you can't see the full numbers.

http://homepages.tu-darmstadt.de/~fritschi/twofish/output_20060610_130806_x86_64.html

Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] twofish: i586 assembly version
Joachim Fritschi [Tue, 20 Jun 2006 10:59:16 +0000 (20:59 +1000)]
[CRYPTO] twofish: i586 assembly version

The patch passed the trycpt tests and automated filesystem tests.
This rewrite resulted in some nice perfomance increase over my last patch.

Short summary of the tcrypt benchmarks:

Twofish Assembler vs. Twofish C (256bit 8kb block CBC)
encrypt: -33% Cycles
decrypt: -45% Cycles

Twofish Assembler vs. AES Assembler (128bit 8kb block CBC)
encrypt: +3%  Cycles
decrypt: -22% Cycles

Twofish Assembler vs. AES Assembler (256bit 8kb block CBC)
encrypt: -20% Cycles
decrypt: -36% Cycles

Full Output:
http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-asm-i586.txt
http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-c-i586.txt
http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-aes-asm-i586.txt

Here is another bonnie++ benchmark with encrypted filesystems. All runs with
the twofish assembler modules max out the drivespeed. It should give some
idea what the module can do for encrypted filesystem performance even though
you can't see the full numbers.

http://homepages.tu-darmstadt.de/~fritschi/twofish/output_20060611_205432_x86.html

Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] twofish: Fix the priority
Joachim Fritschi [Tue, 20 Jun 2006 10:39:29 +0000 (20:39 +1000)]
[CRYPTO] twofish: Fix the priority

This patch adds a proper driver name and priority to the generic c
implemtation to allow coexistance of c and assembler modules.

Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] twofish: Split out common c code
Joachim Fritschi [Tue, 20 Jun 2006 10:37:23 +0000 (20:37 +1000)]
[CRYPTO] twofish: Split out common c code

This patch splits up the twofish crypto routine into a common part ( key
setup  ) which will be uses by all twofish crypto modules ( generic-c , i586
assembler and x86_64 assembler ) and generic-c part. It also creates a new
header file which will be used by all 3 modules.

This eliminates all code duplication.

Correctness was verified with the tcrypt module and automated test scripts.

Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[CRYPTO] api: Fixed crypto_tfm context alignment
Herbert Xu [Mon, 21 Aug 2006 11:03:52 +0000 (21:03 +1000)]
[CRYPTO] api: Fixed crypto_tfm context alignment

Previously the __aligned__ attribute was added to the crypto_tfm context
member to ensure it is alinged correctly on architectures such as arm.
Unfortunately kmalloc does not use the same minimum alignment rules as
gcc so this is useless.

This patch changes it to use kmalloc's minimum alignment.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years agoocfs2: Remove overzealous BUG_ON()
Mark Fasheh [Wed, 9 Aug 2006 20:23:08 +0000 (13:23 -0700)]
ocfs2: Remove overzealous BUG_ON()

The truncate code was never supposed to BUG() on an allocator it doesn't
know about, but rather to ignore it. Right now, this does nothing, but when
we change our allocation paths to use all suballocator files, this will
allow current versions of the fs module to work fine.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Don't print on unknown remote blocking call
Mark Fasheh [Thu, 14 Sep 2006 01:57:57 +0000 (18:57 -0700)]
ocfs2: Don't print on unknown remote blocking call

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Remove EXPERIMENTAL dependency
Mark Fasheh [Thu, 14 Sep 2006 17:28:06 +0000 (10:28 -0700)]
ocfs2: Remove EXPERIMENTAL dependency

Things have been working pretty well for a while now.

We should've probably done this at least one kernel
revision ago, but it doesn't hurt to be paranoid.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: implement directory read-ahead
Mark Fasheh [Fri, 21 Apr 2006 20:49:02 +0000 (13:49 -0700)]
ocfs2: implement directory read-ahead

Uptodate.c now knows about read-ahead buffers. Use some more aggressive
logic in ocfs2_readdir().

The two functions which currently use directory read-ahead are
ocfs2_find_entry() and ocfs2_readdir().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: properly update i_mtime on buffered write
Mark Fasheh [Tue, 11 Jul 2006 21:38:54 +0000 (14:38 -0700)]
ocfs2: properly update i_mtime on buffered write

We weren't always updating i_mtime on writes, so fix ocfs2_commit_write() to
handle this.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Acked-by: Zach Brown <zach.brown@oracle.com>
17 years agoocfs2: Fix directory link count checks in ocfs2_link()
Tiger Yang [Fri, 1 Sep 2006 03:39:47 +0000 (20:39 -0700)]
ocfs2: Fix directory link count checks in ocfs2_link()

Remove the redundant "i_nlink >= OCFS2_LINK_MAX" check and adds an unlinked
directory check in ocfs2_link().

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>