Commit 483b942 1 parent 11793ea commit 483b942 Copy full SHA for 483b942
File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 57
57
#include < sys/vmmeter.h>
58
58
#endif
59
59
#endif
60
+ #ifdef __linux__
61
+ #include < sys/auxv.h>
62
+ #endif
60
63
61
64
// ! Necessary on some platforms
62
65
extern char ** environ;
@@ -329,6 +332,28 @@ void RandAddStaticEnv(CSHA512& hasher)
329
332
// Bitcoin client version
330
333
hasher << CLIENT_VERSION;
331
334
335
+ #ifdef __linux__
336
+ // Information available through getauxval()
337
+ # ifdef AT_HWCAP
338
+ hasher << getauxval (AT_HWCAP);
339
+ # endif
340
+ # ifdef AT_HWCAP2
341
+ hasher << getauxval (AT_HWCAP2);
342
+ # endif
343
+ # ifdef AT_RANDOM
344
+ const unsigned char * random_aux = (const unsigned char *)getauxval (AT_RANDOM);
345
+ if (random_aux) hasher.Write (random_aux, 16 );
346
+ # endif
347
+ # ifdef AT_PLATFORM
348
+ const char * platform_str = (const char *)getauxval (AT_PLATFORM);
349
+ if (platform_str) hasher.Write ((const unsigned char *)platform_str, strlen (platform_str) + 1 );
350
+ # endif
351
+ # ifdef AT_EXECFN
352
+ const char * exec_str = (const char *)getauxval (AT_EXECFN);
353
+ if (exec_str) hasher.Write ((const unsigned char *)exec_str, strlen (exec_str) + 1 );
354
+ # endif
355
+ #endif // __linux__
356
+
332
357
#ifdef HAVE_GETCPUID
333
358
AddAllCPUID (hasher);
334
359
#endif
You can’t perform that action at this time.
0 commit comments