|There's more than one way to do things|
Re: Proposed change regarding "Taint" support [overhead]by kcott (Bishop)
|on Aug 13, 2021 at 23:47 UTC||Need Help??|
Thanks for advising of this proposal.
I'm genuinely interested in learning about this. My investigations are potentially incomplete and my inferences could easily be wrong. Any constructive criticism would be welcome.
Without any implicit (setuid/getuid) or explicit (-T) taint checking:
So, ignoring the hex numbers — which I assumed were related to memory locations, like HASH(0x800003c88), ARRAY(0x800003cd0), etc. — and the values directly related to the string content, it would seem that the elements taking part in any overhead are SV = PVMG (cf. SV = PV) and the additional IV and NV. I wasn't able to figure out exactly what that overhead might be.
Now, I could be barking up the wrong tree, which is entirely possible, and, if so, please correct my conclusions. It seems there is no overhead unless there are tainted variables. Is there something else going on that I've overlooked or, perhaps, that I'm simply unaware of?
For comparison and completeness, here's the Devel::Peek output when -T is used:
There's no change for the untainted $x. The tainted version has additional FLAGS and a new MAGIC section. I had found PERL_MAGIC_taint in perlguts and originally thought that was related to PVMG (but maybe that's wrong).