~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/crypto/sha512-glue.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm/crypto/sha512-glue.c (Version linux-6.11-rc3) and /arch/ppc/crypto/sha512-glue.c (Version linux-5.7.19)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  * sha512-glue.c - accelerated SHA-384/512 for    
  4  *                                                
  5  * Copyright (C) 2015 Linaro Ltd <ard.biesheuv    
  6  */                                               
  7                                                   
  8 #include <crypto/internal/hash.h>                 
  9 #include <crypto/sha2.h>                          
 10 #include <crypto/sha512_base.h>                   
 11 #include <linux/crypto.h>                         
 12 #include <linux/module.h>                         
 13                                                   
 14 #include <asm/hwcap.h>                            
 15 #include <asm/neon.h>                             
 16                                                   
 17 #include "sha512.h"                               
 18                                                   
 19 MODULE_DESCRIPTION("Accelerated SHA-384/SHA-51    
 20 MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@    
 21 MODULE_LICENSE("GPL v2");                         
 22                                                   
 23 MODULE_ALIAS_CRYPTO("sha384");                    
 24 MODULE_ALIAS_CRYPTO("sha512");                    
 25 MODULE_ALIAS_CRYPTO("sha384-arm");                
 26 MODULE_ALIAS_CRYPTO("sha512-arm");                
 27                                                   
 28 asmlinkage void sha512_block_data_order(struct    
 29                                         u8 con    
 30                                                   
 31 int sha512_arm_update(struct shash_desc *desc,    
 32                       unsigned int len)           
 33 {                                                 
 34         return sha512_base_do_update(desc, dat    
 35 }                                                 
 36                                                   
 37 static int sha512_arm_final(struct shash_desc     
 38 {                                                 
 39         sha512_base_do_finalize(desc, sha512_b    
 40         return sha512_base_finish(desc, out);     
 41 }                                                 
 42                                                   
 43 int sha512_arm_finup(struct shash_desc *desc,     
 44                      unsigned int len, u8 *out    
 45 {                                                 
 46         sha512_base_do_update(desc, data, len,    
 47         return sha512_arm_final(desc, out);       
 48 }                                                 
 49                                                   
 50 static struct shash_alg sha512_arm_algs[] = {     
 51         .init                   = sha384_base_    
 52         .update                 = sha512_arm_u    
 53         .final                  = sha512_arm_f    
 54         .finup                  = sha512_arm_f    
 55         .descsize               = sizeof(struc    
 56         .digestsize             = SHA384_DIGES    
 57         .base                   = {               
 58                 .cra_name               = "sha    
 59                 .cra_driver_name        = "sha    
 60                 .cra_priority           = 250,    
 61                 .cra_blocksize          = SHA5    
 62                 .cra_module             = THIS    
 63         }                                         
 64 },  {                                             
 65         .init                   = sha512_base_    
 66         .update                 = sha512_arm_u    
 67         .final                  = sha512_arm_f    
 68         .finup                  = sha512_arm_f    
 69         .descsize               = sizeof(struc    
 70         .digestsize             = SHA512_DIGES    
 71         .base                   = {               
 72                 .cra_name               = "sha    
 73                 .cra_driver_name        = "sha    
 74                 .cra_priority           = 250,    
 75                 .cra_blocksize          = SHA5    
 76                 .cra_module             = THIS    
 77         }                                         
 78 } };                                              
 79                                                   
 80 static int __init sha512_arm_mod_init(void)       
 81 {                                                 
 82         int err;                                  
 83                                                   
 84         err = crypto_register_shashes(sha512_a    
 85                                       ARRAY_SI    
 86         if (err)                                  
 87                 return err;                       
 88                                                   
 89         if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON    
 90                 err = crypto_register_shashes(    
 91                                                   
 92                 if (err)                          
 93                         goto err_unregister;      
 94         }                                         
 95         return 0;                                 
 96                                                   
 97 err_unregister:                                   
 98         crypto_unregister_shashes(sha512_arm_a    
 99                                   ARRAY_SIZE(s    
100                                                   
101         return err;                               
102 }                                                 
103                                                   
104 static void __exit sha512_arm_mod_fini(void)      
105 {                                                 
106         crypto_unregister_shashes(sha512_arm_a    
107                                   ARRAY_SIZE(s    
108         if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON    
109                 crypto_unregister_shashes(sha5    
110                                           ARRA    
111 }                                                 
112                                                   
113 module_init(sha512_arm_mod_init);                 
114 module_exit(sha512_arm_mod_fini);                 
115                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php