Do not include crypto/algapi.h
Subsystems (23)
Herbert Xu
maintainercover Do not include crypto/algapi.h
Hi:
The header file crypto/algapi.h is for internal use only. There is no reason to use it outside of the Crypto API. Most uses of it outside of the API should use crypto/utils.h instead.
Feel free to apply this patch to your tree directly. Just send me a reply and I'll drop it from my patch queue.
Thanks,
Signature · 7 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerPATCH 1/12 fscrypt: Do not include crypto/algapi.h
The header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
fs/crypto/keysetup_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/crypto/keysetup_v1.c +1 -1
@@ -20,8 +20,8 @@* managed alongside the master keys in the filesystem-level keyring) */ -#include <crypto/algapi.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include <keys/user-type.h> #include <linux/hashtable.h> #include <linux/scatterlist.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 1/12] fscrypt: Do not include crypto/algapi.h
Quoted 14 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>---
fs/crypto/keysetup_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/crypto/keysetup_v1.c +0
-0
fs/crypto/keysetup_v1.c line 27
Quoted 9 lines
fs/crypto/keysetup_v1.c +1
-1@@ -20,8 +20,8 @@* managed alongside the master keys in the filesystem-level keyring) */ -#include <crypto/algapi.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include <keys/user-type.h> #include <linux/hashtable.h> #include <linux/scatterlist.h>
- Eric
Herbert Xu
maintainerPATCH 2/12 ubifs: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
fs/ubifs/auth.c | 3 +-- fs/ubifs/replay.c | 1 - fs/ubifs/ubifs.h | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
fs/ubifs/auth.c +1 -2
@@ -9,10 +9,9 @@* This file implements various helper functions for UBIFS authentication support */ -#include <linux/crypto.h> #include <linux/verification.h> #include <crypto/hash.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> #include <keys/user-type.h> #include <keys/asymmetric-type.h>
fs/ubifs/replay.c +0 -1
@@ -23,7 +23,6 @@#include "ubifs.h" #include <linux/list_sort.h> #include <crypto/hash.h> -#include <crypto/algapi.h> /** * struct replay_entry - replay list entry.
fs/ubifs/ubifs.h +1 -1
@@ -31,7 +31,7 @@#include <linux/completion.h> #include <crypto/hash_info.h> #include <crypto/hash.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> #include <linux/fscrypt.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
kernel test robot
build botRe: [PATCH 2/12] ubifs: Do not include crypto/algapi.h
kernel test robot noticed the following build errors:
Hi Herbert,
kernel test robot noticed the following build errors:
[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master rw-ubifs/next rw-ubifs/fixes v6.5-rc7 next-20230825] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Herbert-Xu/fscrypt-Do-not-include-crypto-algapi-h/20230823-183716 base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main patch link: https://lore.kernel.org/r/E1qYl9s-006vDm-IW%40formenos.hmeau.com patch subject: [PATCH 2/12] ubifs: Do not include crypto/algapi.h config: x86_64-randconfig-075-20230823 (https://download.01.org/0day-ci/archive/20230826/[email protected]/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce: (https://download.01.org/0day-ci/archive/20230826/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from fs/ubifs/auth.c:12:
>> include/linux/verification.h:23:11: error: use of undeclared identifier 'EINVAL'
return -EINVAL;
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:98:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
set->sig[1] | set->sig[0]) == 0;
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:100:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
return (set->sig[1] | set->sig[0]) == 0;
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^ In file included from fs/ubifs/auth.c:18:
In file included from fs/ubifs/ubifs.h:16:
vim +/EINVAL +23 include/linux/verification.h
817aef260037f3 Yannik Sembritzki 2018-08-16 19
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 20 static inline int system_keyring_id_check(u64 id)
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 21 {
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 22 if (id > (unsigned long)VERIFY_USE_PLATFORM_KEYRING)
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 @23 return -EINVAL;
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 24
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 25 return 0;
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 26 }
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 27 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Herbert Xu
maintainerPATCH 1/1 KEYS: Include linux/errno.h in linux/verification.h
Quoted 5 lines · kernel test robot
All errors (new ones prefixed by >>):
In file included from
fs/ubifs/auth.c:12:Quoted 1 line
Quoted 1 line
include/linux/verification.h:23:11: error: use of undeclared identifier 'EINVAL'
---8<---
Add inclusion of linux/errno.h as otherwise the reference to EINVAL may be invalid.
include/linux/verification.h +1 -0
@@ -8,6 +8,7 @@#ifndef _LINUX_VERIFICATION_H#define _LINUX_VERIFICATION_H +#include <linux/errno.h> #include <linux/types.h> /*
Signature · 7 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
RE: KEYS: Include linux/errno.h in linux/verification.h
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=779564
---Test result---
Test Summary:
CheckPatch FAIL 1.18 seconds GitLint FAIL 0.64 seconds SubjectPrefix FAIL 0.37 seconds BuildKernel PASS 34.28 seconds CheckAllWarning PASS 37.34 seconds CheckSparse PASS 42.76 seconds CheckSmatch PASS 115.58 seconds BuildKernel32 PASS 32.92 seconds TestRunnerSetup PASS 501.03 seconds TestRunner_l2cap-tester PASS 28.86 seconds TestRunner_iso-tester PASS 51.48 seconds TestRunner_bnep-tester PASS 11.30 seconds TestRunner_mgmt-tester PASS 225.81 seconds TestRunner_rfcomm-tester PASS 16.97 seconds TestRunner_sco-tester PASS 20.59 seconds TestRunner_ioctl-tester PASS 19.16 seconds TestRunner_mesh-tester PASS 14.39 seconds TestRunner_smp-tester PASS 15.43 seconds TestRunner_userchan-tester PASS 12.02 seconds IncrementalBuild PASS 31.39 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
KEYS: Include linux/errno.h in linux/verification.h
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #77:
Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/verification.h:23:11: error: use of undeclared identifier 'EINVAL'
total: 0 errors, 1 warnings, 7 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/src/13366546.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
KEYS: Include linux/errno.h in linux/verification.h
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
6: B2 Line has trailing whitespace: "> "
8: B1 Line exceeds max length (85>80): "> >> include/linux/verification.h:23:11: error: use of undeclared identifier 'EINVAL'"
15: B1 Line exceeds max length (82>80): "Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/"
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
---
Regards,
Linux Bluetooth
Re: [PATCH] KEYS: Include linux/errno.h in linux/verification.h
In reply to Herbert XuHi Herbert,
Quoted 22 lines · Herbert Xu
Quoted 5 lines · kernel test robot
All errors (new ones prefixed by >>):
In file included from
fs/ubifs/auth.c:12:Quoted 1 line
Quoted 1 line
include/linux/verification.h:23:11: error: use of undeclared identifier 'EINVAL'---8<---
Add inclusion oflinux/errno.has otherwise the reference to EINVAL may be invalid.Fixes f3cf4134c5c6 ("bpf: Add bpf_lookup_*_key() and bpf_key_put() kfuncs")Reported-by kernel test robot <[email protected]>Signed-off-by Herbert Xu <[email protected]>include/linux/verification.h +0
-0
include/linux/verification.h line 14
Quoted 7 lines
include/linux/verification.h +1
-0@@ -8,6 +8,7 @@#ifndef _LINUX_VERIFICATION_H#define _LINUX_VERIFICATION_H +#include <linux/errno.h> #include <linux/types.h> /*
Looks good, do you plan to route this fix to Linus?
Thanks,
Daniel
kernel test robot
build botRe: [PATCH 2/12] ubifs: Do not include crypto/algapi.h
In reply to Herbert Xukernel test robot noticed the following build errors:
Hi Herbert,
kernel test robot noticed the following build errors:
[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master rw-ubifs/next rw-ubifs/fixes v6.5-rc7 next-20230825] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Herbert-Xu/fscrypt-Do-not-include-crypto-algapi-h/20230823-183716 base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main patch link: https://lore.kernel.org/r/E1qYl9s-006vDm-IW%40formenos.hmeau.com patch subject: [PATCH 2/12] ubifs: Do not include crypto/algapi.h config: x86_64-randconfig-r016-20230823 (https://download.01.org/0day-ci/archive/20230827/[email protected]/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: (https://download.01.org/0day-ci/archive/20230827/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from fs/ubifs/auth.c:12:0:
include/linux/verification.h: In function 'system_keyring_id_check':
>> include/linux/verification.h:23:11: error: 'EINVAL' undeclared (first use in this function)
return -EINVAL;
^~~~~~ include/linux/verification.h:23:11: note: each undeclared identifier is reported only once for each function it appears in
vim +/EINVAL +23 include/linux/verification.h
817aef260037f3 Yannik Sembritzki 2018-08-16 19
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 20 static inline int system_keyring_id_check(u64 id)
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 21 {
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 22 if (id > (unsigned long)VERIFY_USE_PLATFORM_KEYRING)
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 @23 return -EINVAL;
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 24
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 25 return 0;
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 26 }
f3cf4134c5c6c4 Roberto Sassu 2022-09-20 27 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Herbert Xu
maintainerPATCH 3/12 Bluetooth: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
net/bluetooth/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/smp.c +1 -2
@@ -22,11 +22,10 @@#include <linux/debugfs.h> #include <linux/scatterlist.h> -#include <linux/crypto.h> #include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/kpp.h> +#include <crypto/utils.h> #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 3/12] Bluetooth: Do not include crypto/algapi.h
Hi Herbert,
Quoted 17 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>---
net/bluetooth/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)net/bluetooth/smp.c +0
-0@@ -22,11 +22,10 @@#include <linux/debugfs.h>
net/bluetooth/smp.c line 31
Quoted 10 lines
net/bluetooth/smp.c +1
-2#include <linux/scatterlist.h> -#include <linux/crypto.h> #include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/kpp.h> +#include <crypto/utils.h> #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h>
Signature · 1 line
Luiz Augusto von Dentz
Herbert Xu
maintainerPATCH 4/12 ceph: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
net/ceph/messenger_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ceph/messenger_v2.c +1 -1
@@ -8,9 +8,9 @@#include <linux/ceph/ceph_debug.h> #include <crypto/aead.h> -#include <crypto/algapi.h> /* for crypto_memneq() */ #include <crypto/hash.h> #include <crypto/sha2.h> +#include <crypto/utils.h> #include <linux/bvec.h> #include <linux/crc32c.h> #include <linux/net.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 4/12] ceph: Do not include crypto/algapi.h
Quoted 15 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>---
net/ceph/messenger_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ceph/messenger_v2.c +0
-0
net/ceph/messenger_v2.c line 16
Quoted 10 lines
net/ceph/messenger_v2.c +1
-1@@ -8,9 +8,9 @@#include <linux/ceph/ceph_debug.h> #include <crypto/aead.h> -#include <crypto/algapi.h> /* for crypto_memneq() */ #include <crypto/hash.h> #include <crypto/sha2.h> +#include <crypto/utils.h> #include <linux/bvec.h> #include <linux/crc32c.h> #include <linux/net.h>
Applied.
Thanks,
Ilya
Herbert Xu
maintainerPATCH 5/12 ah: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
net/ipv4/ah4.c | 2 +- net/ipv6/ah6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/ah4.c +1 -1
@@ -1,8 +1,8 @@// SPDX-License-Identifier: GPL-2.0-only #define pr_fmt (fmt) "IPsec: " fmt -#include <crypto/algapi.h> #include <crypto/hash.h> +#include <crypto/utils.h> #include <linux/err.h> #include <linux/module.h> #include <linux/slab.h>
net/ipv6/ah6.c +1 -1
@@ -13,8 +13,8 @@#define pr_fmt (fmt) "IPv6: " fmt -#include <crypto/algapi.h> #include <crypto/hash.h> +#include <crypto/utils.h> #include <linux/module.h> #include <linux/slab.h> #include <net/ip.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerPATCH 6/12 wifi: mac80211: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
net/mac80211/fils_aead.c | 2 +- net/mac80211/key.c | 2 +- net/mac80211/wpa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
net/mac80211/fils_aead.c +1 -1
@@ -5,9 +5,9 @@*/ #include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include "ieee80211_i.h" #include "aes_cmac.h"
net/mac80211/key.c +1 -1
@@ -9,6 +9,7 @@* Copyright 2018-2020, 2022-2023 Intel Corporation */ +#include <crypto/utils.h> #include <linux/if_ether.h> #include <linux/etherdevice.h> #include <linux/list.h>
@@ -17,7 +18,6 @@#include <linux/slab.h> #include <linux/export.h> #include <net/mac80211.h> -#include <crypto/algapi.h> #include <asm/unaligned.h> #include "ieee80211_i.h" #include "driver-ops.h"
net/mac80211/wpa.c +1 -1
@@ -15,7 +15,7 @@#include <asm/unaligned.h> #include <net/mac80211.h> #include <crypto/aes.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> #include "ieee80211_i.h" #include "michael.h"
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Johannes Berg
maintainerRe: [PATCH 6/12] wifi: mac80211: Do not include crypto/algapi.h
Quoted 3 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.
No objection, of course, but I don't think it's necessarily clear that it "is for internal use only", it literally says:
* Cryptographic API for algorithms (i.e., low-level API).
which really isn't the same as "don't use this file".
Might want to clarify that, or even move it into crypto/ from include/crypto/ or something?
johannes
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerRe: [PATCH 6/12] wifi: mac80211: Do not include crypto/algapi.h
Quoted 10 lines · Johannes Berg
No objection, of course, but I don't think it's necessarily clear that it "is for internal use only", it literally says:
* Cryptographic API for algorithms (i.e., low-level API).
which really isn't the same as "don't use this file".
Might want to clarify that, or even move it into
crypto/frominclude/crypto/or something?
Yes it should be in include/crypto/internal. Once the churn gets small enough I'll move it there.
Thanks,
Signature · 7 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Johannes Berg
maintainerRe: [PATCH 6/12] wifi: mac80211: Do not include crypto/algapi.h
Quoted 7 lines · Herbert Xu
Quoted 6 lines · Johannes Berg
No objection, of course, but I don't think it's necessarily clear that it "is for internal use only", it literally says:
* Cryptographic API for algorithms (i.e., low-level API).
Quoted 8 lines
Quoted 4 lines
which really isn't the same as "don't use this file".
Might want to clarify that, or even move it into
crypto/frominclude/crypto/or something?Yes it should be in
include/crypto/internal. Once the churn gets small enough I'll move it there.
Sounds good :)
I was kind of waiting to see - but now that others have applied some patches to their tree I've done the same.
johannes
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerRe: [PATCH 6/12] wifi: mac80211: Do not include crypto/algapi.h
Quoted 3 lines · Johannes Berg
I was kind of waiting to see - but now that others have applied some patches to their tree I've done the same.
Noted. Thanks!
Signature · 7 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerPATCH 7/12 mptcp: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
net/mptcp/subflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/subflow.c +1 -1
@@ -9,8 +9,8 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/netdevice.h> -#include <crypto/algapi.h> #include <crypto/sha2.h> +#include <crypto/utils.h> #include <net/sock.h> #include <net/inet_common.h> #include <net/inet_hashtables.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 7/12] mptcp: Do not include crypto/algapi.h
Hello,
Quoted 2 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.
Thank you for the patch! It looks good to me:
I understood that other patches will come later to make it clear crypto/algapi.h is for internal use only so that's good!
net/mptcp/subflow.c line 13
Quoted 11 lines
net/mptcp/subflow.c +1
-1@@ -9,8 +9,8 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/netdevice.h> -#include <crypto/algapi.h> #include <crypto/sha2.h> +#include <crypto/utils.h>
It is fine for me if you carry this patch in your tree: this part here has not changed for a while and there is no ongoing work going to modify it. So there should not be any conflicts when merging the different trees later.
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Herbert Xu
maintainerPATCH 8/12 SUNRPC: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
net/sunrpc/auth_gss/gss_krb5_crypto.c | 2 +- net/sunrpc/auth_gss/gss_krb5_unseal.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
net/sunrpc/auth_gss/gss_krb5_crypto.c +1 -1
@@ -34,9 +34,9 @@* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include <linux/err.h> #include <linux/types.h> #include <linux/mm.h>
net/sunrpc/auth_gss/gss_krb5_unseal.c +0 -2
@@ -57,11 +57,9 @@* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#include <crypto/algapi.h> #include <linux/types.h> #include <linux/jiffies.h> #include <linux/sunrpc/gss_krb5.h> -#include <linux/crypto.h> #include "gss_krb5_internal.h"
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 8/12] SUNRPC: Do not include crypto/algapi.h
Quoted 4 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>
Quoted 37 lines
---
net/sunrpc/auth_gss/gss_krb5_crypto.c | 2 +- net/sunrpc/auth_gss/gss_krb5_unseal.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)net/sunrpc/auth_gss/gss_krb5_crypto.c +1
-1@@ -34,9 +34,9 @@* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include <linux/err.h> #include <linux/types.h> #include <linux/mm.h> net/sunrpc/auth_gss/gss_krb5_unseal.c +0
-2@@ -57,11 +57,9 @@* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#include <crypto/algapi.h> #include <linux/types.h> #include <linux/jiffies.h> #include <linux/sunrpc/gss_krb5.h> -#include <linux/crypto.h> #include "gss_krb5_internal.h"
Signature · 5 lines
Chuck Lever ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerPATCH 9/12 evm: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
security/integrity/evm/evm_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
security/integrity/evm/evm_main.c +1 -2
@@ -14,7 +14,6 @@#define pr_fmt (fmt) "EVM: "fmt#include <linux/init.h> -#include <linux/crypto.h> #include <linux/audit.h> #include <linux/xattr.h> #include <linux/integrity.h>
@@ -24,7 +23,7 @@#include <crypto/hash.h> #include <crypto/hash_info.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> #include "evm.h" int evm_initialized;
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 9/12] evm: Do not include crypto/algapi.h
Quoted 4 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>
Quoted 18 lines
---
security/integrity/evm/evm_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)security/integrity/evm/evm_main.c +0
-1@@ -14,7 +14,6 @@#define pr_fmt (fmt) "EVM: "fmt#include <linux/init.h> -#include <linux/crypto.h> #include <linux/audit.h> #include <linux/xattr.h> #include <linux/integrity.h>
security/integrity/evm/evm_main.c line 29
Quoted 8 lines
security/integrity/evm/evm_main.c +1
-1@@ -24,7 +23,7 @@#include <crypto/hash.h> #include <crypto/hash_info.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> #include "evm.h" int evm_initialized;
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerPATCH 10/12 KEYS: encrypted: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
security/keys/encrypted-keys/encrypted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/keys/encrypted-keys/encrypted.c +1 -1
@@ -27,10 +27,10 @@#include <linux/scatterlist.h> #include <linux/ctype.h> #include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/sha2.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include "encrypted.h" #include "ecryptfs_format.h"
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 10/12] KEYS: encrypted: Do not include crypto/algapi.h
Quoted 4 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>
Quoted 11 lines
---
security/keys/encrypted-keys/encrypted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/keys/encrypted-keys/encrypted.c +0
-0@@ -27,10 +27,10 @@#include <linux/scatterlist.h>
security/keys/encrypted-keys/encrypted.c line 36
Quoted 10 lines
security/keys/encrypted-keys/encrypted.c +1
-1#include <linux/ctype.h> #include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/sha2.h> #include <crypto/skcipher.h> +#include <crypto/utils.h> #include "encrypted.h" #include "ecryptfs_format.h"
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Herbert Xu
maintainerPATCH 11/12 wireguard: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
drivers/net/wireguard/cookie.c | 2 +- drivers/net/wireguard/netlink.c | 2 +- drivers/net/wireguard/noise.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireguard/cookie.c +1 -1
@@ -12,9 +12,9 @@#include <crypto/blake2s.h> #include <crypto/chacha20poly1305.h> +#include <crypto/utils.h> #include <net/ipv6.h> -#include <crypto/algapi.h> void wg_cookie_checker_init (struct cookie_checker *checker,struct wg_device *wg)
drivers/net/wireguard/netlink.c +1 -1
@@ -12,10 +12,10 @@#include <uapi/linux/wireguard.h> +#include <crypto/utils.h> #include <linux/if.h> #include <net/genetlink.h> #include <net/sock.h> -#include <crypto/algapi.h> static struct genl_family genl_family;
drivers/net/wireguard/noise.c +1 -1
@@ -10,12 +10,12 @@#include "queueing.h" #include "peerlookup.h" +#include <crypto/utils.h> #include <linux/rcupdate.h> #include <linux/slab.h> #include <linux/bitmap.h> #include <linux/scatterlist.h> #include <linux/highmem.h> -#include <crypto/algapi.h> /* This implements Noise_IKpsk2: *
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 11/12] wireguard: Do not include crypto/algapi.h
Quoted 51 lines · Herbert Xu
The header file
crypto/algapi.his for internal use only. Use the header filecrypto/utils.hinstead.Signed-off-by Herbert Xu <[email protected]>---
drivers/net/wireguard/cookie.c | 2 +- drivers/net/wireguard/netlink.c | 2 +- drivers/net/wireguard/noise.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)drivers/net/wireguard/cookie.c +1
-1@@ -12,9 +12,9 @@#include <crypto/blake2s.h> #include <crypto/chacha20poly1305.h> +#include <crypto/utils.h> #include <net/ipv6.h> -#include <crypto/algapi.h> void wg_cookie_checker_init (struct cookie_checker *checker,struct wg_device *wg)drivers/net/wireguard/netlink.c +1
-1@@ -12,10 +12,10 @@#include <uapi/linux/wireguard.h> +#include <crypto/utils.h> #include <linux/if.h> #include <net/genetlink.h> #include <net/sock.h> -#include <crypto/algapi.h> static struct genl_family genl_family;drivers/net/wireguard/noise.c +0
-0@@ -10,12 +10,12 @@#include "queueing.h" #include "peerlookup.h"
drivers/net/wireguard/noise.c line 21
Quoted 10 lines
drivers/net/wireguard/noise.c +1
-1+#include <crypto/utils.h> #include <linux/rcupdate.h> #include <linux/slab.h> #include <linux/bitmap.h> #include <linux/scatterlist.h> #include <linux/highmem.h> -#include <crypto/algapi.h> /* This implements Noise_IKpsk2: *
Small nit - with the exception of the cookie.c reordering, could you maintain the existing #include ordering of the other files? No need to send a v2 for that if you don't want. And please make the entire commit subject lowercase. With those done,
As a side note, you may want to eventually do something to make sure people don't add back algapi.h, like move it to internal/ or out of include/ all together. I figure you've already thought about this, and this series is just the first step.
Jason
Herbert Xu
maintainerPATCH v2 1/1 wireguard: do not include crypto/algapi.h
Quoted 7 lines · Jason A. Donenfeld
Small nit - with the exception of the
cookie.creordering, could you maintain the existing #include ordering of the other files? No need to send a v2 for that if you don't want. And please make the entire commit subject lowercase. With those done,
Thanks. As these patches are independent of each other, I'll just repost this one patch and delete it from the original series.
Quoted 4 lines
As a side note, you may want to eventually do something to make sure people don't add back
algapi.h, like move it to internal/ or out ofinclude/all together. I figure you've already thought about this, and this series is just the first step.
Sure that is the idea. Although judging from the result of my grep, it seems most of the external users are due to the utility functions which hopefully won't be an issue anymore because of the new crypto/utils.h file.
---8<---
The header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
drivers/net/wireguard/cookie.c | 2 +- drivers/net/wireguard/netlink.c | 2 +- drivers/net/wireguard/noise.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireguard/cookie.c +1 -1
@@ -12,9 +12,9 @@#include <crypto/blake2s.h> #include <crypto/chacha20poly1305.h> +#include <crypto/utils.h> #include <net/ipv6.h> -#include <crypto/algapi.h> void wg_cookie_checker_init (struct cookie_checker *checker,struct wg_device *wg)
drivers/net/wireguard/netlink.c +1 -1
@@ -15,7 +15,7 @@#include <linux/if.h> #include <net/genetlink.h> #include <net/sock.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> static struct genl_family genl_family;
drivers/net/wireguard/noise.c +1 -1
@@ -15,7 +15,7 @@#include <linux/bitmap.h> #include <linux/scatterlist.h> #include <linux/highmem.h> -#include <crypto/algapi.h> +#include <crypto/utils.h> /* This implements Noise_IKpsk2: *
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Herbert Xu
maintainerPATCH 12/12 chelsio: Do not include crypto/algapi.h
In reply to Herbert XuThe header file crypto/algapi.h is for internal use only. Use the header file crypto/utils.h instead.
---
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c | 2 -- drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.h | 1 - drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h | 1 - 3 files changed, 4 deletions(-)
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c +0 -2
@@ -39,7 +39,6 @@#include <linux/kernel.h> #include <linux/module.h> -#include <linux/crypto.h> #include <linux/skbuff.h> #include <linux/rtnetlink.h> #include <linux/highmem.h>
@@ -49,7 +48,6 @@#include <net/esp.h> #include <net/xfrm.h> #include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/sha1.h> #include <crypto/sha2.h>
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.h +0 -1
@@ -4,7 +4,6 @@#ifndef __CHCR_IPSEC_H__#define __CHCR_IPSEC_H__ -#include <crypto/algapi.h> #include "t4_hw.h" #include "cxgb4.h" #include "t4_msg.h"
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h +0 -1
@@ -7,7 +7,6 @@#define __CHTLS_H__#include <crypto/aes.h> -#include <crypto/algapi.h> #include <crypto/hash.h> #include <crypto/sha1.h> #include <crypto/sha2.h>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/