Re: [PATCH 08/62] x86: remove the second argument of k[un]map_atomic()

2011-11-28 Thread Avi Kivity
On 11/27/2011 07:26 AM, Cong Wang wrote: Signed-off-by: Cong Wang amw...@redhat.com --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/paging_tmpl.h |4 ++-- arch/x86/kvm/x86.c |8 The kvm parts are: Acked-by: Avi Kivity

Re: [PATCH 08/62] x86: remove the second argument of k[un]map_atomic()

2011-11-28 Thread Herbert Xu
On Sun, Nov 27, 2011 at 01:26:48PM +0800, Cong Wang wrote: Signed-off-by: Cong Wang amw...@redhat.com Acked-by: Herbert Xu herb...@gondor.apana.org.au Thanks, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

[PATCH 04/14] KEYS: Create a key type that can be used for general cryptographic operations

2011-11-28 Thread David Howells
Create a key type that can be used for general cryptographic operations, such as encryption, decryption, signature generation and signature verification. The key type is crypto and can provide access to a variety of cryptographic algorithms. Signed-off-by: David Howells dhowe...@redhat.com ---

[PATCH 05/14] KEYS: Add a DSA crypto key subtype

2011-11-28 Thread David Howells
Add a key subtype for handling DSA crypto keys. For the moment it only provides a signature verification facility. Signed-off-by: David Howells dhowe...@redhat.com --- security/Kconfig | 10 + security/keys/Makefile |2 security/keys/crypto_dsa.h |

[PATCH 06/14] KEYS: Add a RSA crypto key subtype

2011-11-28 Thread David Howells
Add a key subtype for handling RSA crypto keys. For the moment it only provides a signature verification facility. Signed-off-by: David Howells dhowe...@redhat.com --- security/Kconfig |9 + security/keys/Makefile |1 security/keys/crypto_rsa.c | 394

[PATCH 08/14] KEYS: Add signature verification facility

2011-11-28 Thread David Howells
Add a facility whereby a key subtype may be asked to verify a signature against the data it is purported to have signed. Signed-off-by: David Howells dhowe...@redhat.com --- Documentation/security/keys-crypto.txt | 106 +++- include/keys/crypto-subtype.h |

[PATCH 10/14] KEYS: Add a crypto key request function

2011-11-28 Thread David Howells
Add a function by which crypto keys can be requested. A keyring is supplied for the function to search (which can be, say, a system keyring containing keys for kernel module signature checking). The function also provides a point at which hardware key caches, such as a TPM, can be consulted.

[PATCH 01/14] MPILIB: Export some more symbols

2011-11-28 Thread David Howells
Export some more symbols for use by the DSA key subtype. Signed-off-by: David Howells dhowe...@redhat.com --- lib/mpi/mpi-cmp.c |2 ++ lib/mpi/mpi-div.c |1 + lib/mpi/mpi-inv.c |1 + lib/mpi/mpi-mpow.c |1 + lib/mpi/mpi-mul.c |1 + 5 files changed, 6 insertions(+), 0

[PATCH 02/14] KEYS: Permit key_serial() to be called with a const key pointer

2011-11-28 Thread David Howells
Permit key_serial() to be called with a const key pointer. Signed-off-by: David Howells dhowe...@redhat.com --- include/linux/key.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/key.h b/include/linux/key.h index 183a6af..f87b51b 100644 ---

[PATCH 03/14] PGP: Add definitions (RFC 4880) and packet parser

2011-11-28 Thread David Howells
Add some useful PGP definitions from RFC 4880. These describe details of public key crypto as used by crypto keys for things like signature verification. Also add a simple parser that extracts the packets from a PGP blob and passes the desirous ones to the given processor function:

[PATCH 13/14] MODSIGN: Module ELF verifier

2011-11-28 Thread David Howells
Do preliminary verification of the ELF structure of a module. This is used to make sure that the ELF structure can then be used to check the module signature and access the module data without breaking the module loader. If the module's ELF metadata is determined to be bad, then ELIBBAD will be

[PATCH 09/14] KEYS: DSA key signature verification

2011-11-28 Thread David Howells
Signature verification routines for DSA crypto key subtype. Signed-off-by: David Howells dhowe...@redhat.com --- security/keys/Makefile|2 security/keys/crypto_dsa.h| 11 + security/keys/crypto_dsa_verify.c | 375 + 3 files

[PATCH 11/14] KEYS: Provide a function to load keys from a PGP keyring blob

2011-11-28 Thread David Howells
Provide a function to load keys from a PGP keyring blob for use in initialising the module signing key keyring: int load_PGP_keys(const u8 *pgpdata, size_t pgpdatalen, struct key *keyring, const char *descprefix); The keys are labelled with descprefix plus a

[PATCH 07/14] PGP: Add signature parser

2011-11-28 Thread David Howells
Add some PGP signature parsing helpers: (1) A function to parse V4 signature subpackets and pass the desired ones to a processor function: int pgp_parse_sig_subpkts(const u8 *data, size_t datalen, struct pgp_parse_sig_context *ctx); (2) A

[PATCH 00/14][RFC] Crypto keys and module signing

2011-11-28 Thread David Howells
Here are a set of patches that create a framework for using cryptographic keys within the kernel. The basic crypto key has no requirements as to how the key is implemented; it's basically a jump table for the operations and an anchor for any relevant data. I have provided a couple of subtypes:

[PATCH 02/14] Moved a long comment from lib/crc32.c to Documentation/crc32.txt

2011-11-28 Thread Darrick J. Wong
where it will more likely get read. - Edited the resulting document to add an explanation of the slicing-by-n algorithm. Signed-off-by: George Spelvin li...@horizon.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- Documentation/00-INDEX |2 +

[PATCH 05/14] Misc cleanup of lib/crc32.c and related files

2011-11-28 Thread Darrick J. Wong
- removed unnecessary header files. - straightened out some convoluted ifdef's - rewrote some references to 2 dimensional arrays as 1 dimensional arrays to make them correct. I.e. replaced tab[i] with tab[0][i]. - a few trivial whitespace changes -

[PATCH 03/14] Replaced the unit test provided in crc32.c, which doesn't have a

2011-11-28 Thread Darrick J. Wong
makefile and doesn't compile with current headers, with a simpler self test routine that also gives a measure of performance and runs at module init time. The self test option can be enabled through a configuration option CONFIG_CRC32_SELFTEST. The test stresses the pre and post loops and is thus

[PATCH 10/14] Some final changes

2011-11-28 Thread Darrick J. Wong
- added a comment at the top of crc32.c Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 2c8e8c0..d56516d 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@

[PATCH 13/14] crc32: Add self-test code for crc32c

2011-11-28 Thread Darrick J. Wong
Add self-test code for crc32c. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 363 ++- 1 files changed, 261 insertions(+), 102 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 8df9561..382fa76 100644 ---

[PATCH 06/14] crc32.c in its original version freely mixed u32, __le32 and __be32 types

2011-11-28 Thread Darrick J. Wong
which caused warnings from sparse with __CHECK_ENDIAN__. This patch fixes these by forcing the types to u32. Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c

[PATCH 12/14] crypto: crc32c should use library implementation

2011-11-28 Thread Darrick J. Wong
Since lib/crc32.c now provides crc32c, remove the software implementation here and call the library function instead. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Kconfig |1 + crypto/crc32c.c | 94 ++- 2 files changed, 4

[PATCH 11/14] crc32: Bolt on crc32c

2011-11-28 Thread Darrick J. Wong
Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32.h |2 ++ lib/Kconfig |8 +++--- lib/crc32.c | 62 +++-- lib/crc32defs.h |

[PATCH 08/14] add slicing-by-8 algorithm to the existing

2011-11-28 Thread Darrick J. Wong
slicing-by-4 algorithm. This consists of: - extend largest BITS size from 32 to 64 - extend tables from tab[4][256] to up to tab[8][256] - Add code for inner loop. Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c | 40

[PATCH 09/14] Add two changes that improve the performance of x86 systems

2011-11-28 Thread Darrick J. Wong
1. replace main loop with incrementing counter this change improves the performance of the selftest by about 5-6% on Nehalem CPUs. The apparent reason is that the compiler can use the loop index to perform an indexed memory access. This is

[PATCH v5.1 00/14] crc32c: Add faster algorithm and self-test code

2011-11-28 Thread Darrick J. Wong
Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It removes the crc32c implementation in crypto/ in favor of using the stamped-out one in lib/. There is also a change to Kconfig so that the kernel builder can pick an

[PATCH 01/14] removed two instances of trailing whitespaces

2011-11-28 Thread Darrick J. Wong
- remove trailing whitespace from lib/crc32.c - remove trailing whitespace from lib/crc32defs.h Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c |2 +- lib/crc32defs.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 07/14] crc32.c provides a choice of one of several algorithms for

2011-11-28 Thread Darrick J. Wong
computing the LSB and LSB versions of the CRC32 checksum based on the parameters CRC_LE_BITS and CRC_BE_BITS. In the original version the values 1, 2, 4 and 8 respectively selected versions of the alrogithm that computed the crc 1, 2, 4 and 32 bits as a time. This patch series adds a new version

[PATCH 04/14] Replace 2D array references by pointer references in loops.

2011-11-28 Thread Darrick J. Wong
This change has no effect on X86 code but improves PPC performance. Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 7a0e5a9..c93c9ae 100644