-
jtgrassiegreenpillow11[m]: rbrunner: IIRC RR 8149 addressed the multisig issues
-
jtgrassie
-
ofrnxmr[m]I remember.
-
ofrnxmr[m]Ooo is the only one who can answer on the vulnerabilities that still exist
-
jeffro256[m]I miss him/her
-
jeffro256[m]Everyday
-
jeffro256[m]moneromooo Does this commit monero-project/monero #5370/commits/4d29e80aae376e116cecc59c82d7871c9f66ba96#diff-d229136ad349270fc2700a14156517556c003df8494b0233c526046430e57d57 work because copy elision is not done with crypto::secret_key b/c of the non-trivial destructor?
-
moneromoooI am not sure. It works because it is using the same local instead of recreating one per loop.
-
moneromoooSo ctor/dtor don't constantly get called for a new object.
-
moneromoooDoes that answer your question ?
-
jeffro256[m]ohhhhhhhhhhhhhhhhhhhhhh
-
jeffro256[m]Yes that answers it. I though for some reason the C++ compiler was calling ctor/dtor before AND after returning the crypto::secret_key from the function
-
jeffro256[m]Like 1. ctor/dtor 2. copy value in stack 3. ctor/dtor
-
jeffro256[m]Thanks
-
jeffro256[m]git grep -E 'secret_key +[a-zA-Z0-9_:]+\('
-
jeffro256[m]There's a lot of functions that return secret_keys. Maybe could be a good avenue for similar optimizations
-
moneromoooYou'll see mlock/munlock in the profile if you find one.
-
jeffro256[m]"in the profile"?
-
moneromoooI mean the output of, eg, perf top.
-
jeffro256[m]Ah gotcha
-
jeffro256[m]Now it is too late and wouldn't really be worth the effort, but a custom allocator could have been interesting for this. Call it MlockScrubAllocator. One giant chunk of memory is allocated once with mlock() called once on allocation and munlock() called once on deallocation. Deallocs thru our allocator would scrub the used memory automatically. And crypto::secret_key (or any other type which we want to have these properties) would be
-
jeffro256[m]a RAII pointer allocated thru our custom allocator.
-
rbrunnerjtgrassie:
-
rbrunner"greenpillow11[m]: rbrunner: IIRC RR 8149 addressed the multisig issues"
-
rbrunnerThanks. Yes, but we *still* label it experimental in the latest release, if I remember correctly? Especially in the CLI wallet