[DTrace-devel] [PATCH v3 04/19] memcpy: bounds-check

Nick Alcock nick.alcock at oracle.com
Fri Apr 1 13:10:08 UTC 2022


On 31 Mar 2022, Kris Van Hees verbalised:

> On Thu, Mar 31, 2022 at 12:13:21AM -0400, Kris Van Hees via DTrace-devel wrote:
>> First of, the subject of this patch is misleading.  The patch itself has
>> nothing to do with bounds checking.  It simply adds a check to see whether
>> the bpf_probe_read() helper call returned an error, and if it does, it
>> raises a BADADDR fault.

Yeah, the subject line is bad. Adjusted to

memcpy: error-check

which is what I meant to write :) what can I say, I've had
bounds-checking on my mind lately...

> Forgot to add that this patch is also not needed for the alloca patch series,
> so it would be best to keep it separate.

Provisionally moved out (it felt like it belonged in this series because
of the similarity to the other null-checking stuff in here, but I am not
deeply attached to that notion). Will do yet another test run to make
sure it really is unnecessary and that removing it doesn't cause the
verifier to scream its head off due to chasing alloca-provided
potentially-null pointers past the no-longer-present null check. (But a
quick alloca-only run suggests things are probably OK on that score.)



More information about the DTrace-devel mailing list