[DTrace-devel] [PATCH 1/8 v3] Do not set NONALLOCA taint on VAR[IDX]

Kris Van Hees kris.van.hees at oracle.com
Mon Jun 6 19:50:50 UTC 2022


On Mon, Jun 06, 2022 at 08:38:59PM +0100, Nick Alcock wrote:
> On 6 Jun 2022, Kris Van Hees via DTrace-devel told this:
> 
> > The logic for setting a NONALLOCA taint on an identifier for stores of
> > non-alloca, non-literal-0 values in the DT_OP_LBRAC handling in
> > dt_node_op2() is incorrect.  We are removing it with this patch.
> > Further analysis is necessary to determine whether it can be applied to
> > the underlying array variable identifier and how.
> 
> ... looks good -- though I'm fairly sure I can make things misbehave
> now, they were misbehaving before.

Which things?  If there are tests for them, then no, because all alloca tests
pass with this patch applied.

> Reviewed-by: Nick Alcock <nick.alcock at oracle.com>

Thanks.

> ... but I'd better add a test to make this fail again. I bet we can now
> have simultaneous alloca and nonalloca for the same variable by
> assigning, say, alloca() to it in one probe and a literal 5 in another,
> leading to a verifier failure.

THe only case that fails (and not related to this because it was failing before
this patch) are regulat arrays.  That has nothing to do with the LBRAC code
that my patch is related to.

Assignment to a variable is handled in different code.  You already have tests
that check assignment from alloca() and literals and those tests still pass.
Again, the only one you were not testing (regular array element) was already
failing anywa, and that has nothing to do with this patch, i.e. you original
changes to the LBRAC case were not having any real effect anyway.

> I'm a bit surprised no tests are failing really :(



More information about the DTrace-devel mailing list