Commit 78cd170
nfsd: Use MD5 library instead of crypto_shash
Update NFSD's support for "legacy client tracking" (which uses MD5) to
use the MD5 library instead of crypto_shash. This has several benefits:
- Simpler code. Notably, much of the error-handling code is no longer
needed, since the library functions can't fail.
- Improved performance due to reduced overhead. A microbenchmark of
nfs4_make_rec_clidname() shows a speedup from 1455 cycles to 425.
- The MD5 code can now safely be built as a loadable module when nfsd is
built as a loadable module. (Previously, nfsd forced the MD5 code to
built-in, presumably to work around the unreliability of the
name-based loading.) Thus select MD5 from the tristate option NFSD if
NFSD_LEGACY_CLIENT_TRACKING, instead of from the bool option NFSD_V4.
- Fixes a bug where legacy client tracking was not supported on kernels
booted with "fips=1", due to crypto_shash not allowing MD5 to be used.
This particular use of MD5 is not for a cryptographic purpose, though,
so it is acceptable even when fips=1 (see
https://lore.kernel.org/r/dae495a93cbcc482f4ca23c3a0d9360a1fd8c3a8.camel@redhat.com/).
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent fceb873 commit 78cd170
2 files changed
Lines changed: 11 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 102 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 103 | + | |
114 | 104 | | |
115 | 105 | | |
116 | 106 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 107 | | |
147 | 108 | | |
148 | 109 | | |
| |||
171 | 132 | | |
172 | 133 | | |
173 | 134 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 135 | + | |
177 | 136 | | |
178 | 137 | | |
179 | 138 | | |
| |||
354 | 313 | | |
355 | 314 | | |
356 | 315 | | |
357 | | - | |
358 | | - | |
359 | | - | |
| 316 | + | |
360 | 317 | | |
361 | 318 | | |
362 | 319 | | |
| |||
636 | 593 | | |
637 | 594 | | |
638 | 595 | | |
639 | | - | |
640 | 596 | | |
641 | 597 | | |
642 | 598 | | |
| |||
646 | 602 | | |
647 | 603 | | |
648 | 604 | | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
| 605 | + | |
654 | 606 | | |
655 | 607 | | |
656 | 608 | | |
| |||
1243 | 1195 | | |
1244 | 1196 | | |
1245 | 1197 | | |
1246 | | - | |
1247 | 1198 | | |
1248 | 1199 | | |
1249 | 1200 | | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
| 1201 | + | |
1253 | 1202 | | |
1254 | 1203 | | |
1255 | 1204 | | |
| |||
1294 | 1243 | | |
1295 | 1244 | | |
1296 | 1245 | | |
1297 | | - | |
1298 | 1246 | | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
| 1247 | + | |
1302 | 1248 | | |
1303 | 1249 | | |
1304 | 1250 | | |
| |||
1671 | 1617 | | |
1672 | 1618 | | |
1673 | 1619 | | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
1677 | | - | |
1678 | | - | |
| 1620 | + | |
1679 | 1621 | | |
1680 | 1622 | | |
1681 | 1623 | | |
| |||
0 commit comments