[DTrace-devel] [PATCH 05/14] alloca: new faults

Nick Alcock nick.alcock at oracle.com
Wed Mar 9 22:03:37 UTC 2022


On 9 Mar 2022, Kris Van Hees told this:

> On Wed, Mar 09, 2022 at 01:24:12PM +0000, Nick Alcock wrote:
>> > So, I really do not see the need for this new fault that can never happen.
>> 
>> It won't -- but the verifier will run through it because it thinks it
>> might execute, and we need at the very least to do a goto exit. The
>> INTERR is to make sure that if it ever *does* execute, we know, because
>> it's a bug.
>
> So just put in an 'exit'.  No need to even use a jump to an exit label.  Just
> a plain 'exit', emitted using BPF_RETURN().

Oh. I could do that... but that would turn a valid error (and reaching
this point *is* an out of bounds condition which should yield an error)
into a deeply confusing silent exit.

Do we really want to produce a system in which a bug produces a result
like that? It seems needlessly brittle, and compared to emitting the
correct DTRACEFLT_BADSIZE fault saves no instructions, since I'm already
emitting one of those in the other error path and just need to jump
there :)

Anyway -- another patch series coming, likely tomorrow. Have a look at
that. The internal fault is gone. (The size fault, of course, is not.)

-- 
NULL && (void)



More information about the DTrace-devel mailing list