Commit 09351f5
committed
Merge bitcoin/bitcoin#27699: random: drop syscall wrapper usage for getrandom()
5228223 ci: remove MSAN getrandom syscall workaround (fanquake)
d5e0691 random: switch to using getrandom() directly (fanquake)
c2ba3f5 random: add [[maybe_unused]] to GetDevURandom (fanquake)
c13c97d random: getentropy on macOS does not need unistd.h (fanquake)
Pull request description:
This requires a linux kernel of `3.17`+, which seems entirely
reasonable. `3.17` went EOL in 2015, and the last supported `3.x` kernel
(`3.16`) went EOL > 4 years ago, in 2020. For reference, the current
oldest maintained kernel is `4.14` (released 2017, going EOL Jan 2024).
Support for `getrandom()` (and `getentropy()`) was added to
glibc `2.25` https://sourceware.org/legacy-ml/libc-alpha/2017-02/msg00079.html:
> * The getentropy and getrandom functions, and the <sys/random.h> header
file have been added.
and we already require `2.27` or later.
All that being said, I don't think you would encounter a current day (+~6 months from now)
system, running with kernel headers older than 3.17 (released 2014) but also having a
glibc of 2.27+ (released 2018)?
Removing this (our only) use of `syscall()` also means we can drop a workaround in our MSAN jobs.
If this is merged, I'll drop the [same workaround in oss-fuzz](https://github.com/google/oss-fuzz/blob/25946a544856413d31d9cbb3a366a4aef5a8fd60/projects/bitcoin-core/build.sh#L49-L56).
ACKs for top commit:
josibake:
ACK bitcoin/bitcoin@5228223
hebasto:
ACK 5228223, I've tested build system changes on Ubuntu 22.04 and macOS Monterey 12.6.6 (x86_64).
Tree-SHA512: cc978e08510c461b875ca8c08ae176b4519fa1108f0efd74dcb7474518945357e0184e54423282c9a496de195e4ddc3e221ee78623bd63e24c50cc86acdf32e2File tree
4 files changed
+14
-44
lines changed- ci/test
- doc
- src
4 files changed
+14
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 104 | | |
113 | 105 | | |
114 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
1179 | 1178 | | |
1180 | 1179 | | |
1181 | 1180 | | |
1182 | | - | |
1183 | | - | |
| 1181 | + | |
| 1182 | + | |
1184 | 1183 | | |
1185 | 1184 | | |
1186 | 1185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 31 | + | |
37 | 32 | | |
38 | 33 | | |
| 34 | + | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
| |||
252 | 248 | | |
253 | 249 | | |
254 | 250 | | |
255 | | - | |
| 251 | + | |
256 | 252 | | |
257 | 253 | | |
258 | 254 | | |
| |||
285 | 281 | | |
286 | 282 | | |
287 | 283 | | |
288 | | - | |
| 284 | + | |
289 | 285 | | |
290 | 286 | | |
291 | 287 | | |
292 | 288 | | |
293 | 289 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
| 290 | + | |
| 291 | + | |
305 | 292 | | |
306 | 293 | | |
307 | 294 | | |
| |||
311 | 298 | | |
312 | 299 | | |
313 | 300 | | |
314 | | - | |
315 | | - | |
316 | 301 | | |
317 | | - | |
318 | | - | |
319 | 302 | | |
320 | 303 | | |
321 | 304 | | |
322 | | - | |
323 | | - | |
324 | 305 | | |
325 | 306 | | |
326 | 307 | | |
| |||
334 | 315 | | |
335 | 316 | | |
336 | 317 | | |
337 | | - | |
338 | | - | |
339 | 318 | | |
340 | 319 | | |
341 | 320 | | |
| |||
0 commit comments