odp icon indicating copy to clipboard operation
odp copied to clipboard

[PATCH v2] linux-gen: event: add event validation support

Open MatiasElo opened this issue 2 years ago • 2 comments

Add support for runtime event validation (initially buffer endmark checking). Event validation can be enabled during configure with '--enable-event-validation' [warn/abort] or with --enabled-debug=full.

When event validation is enabled, endmarks are checked in:

  • odp_buffer_free() / odp_buffer_free_multi()
  • odp_buffer_is_valid()
  • odp_event_free() / odp_event_free_multi() / odp_event_free_sp()
  • odp_event_is_valid()
  • odp_packet_free() / odp_packet_free_multi() /odp_packet_free_sp()
  • odp_packet_is_valid()

MatiasElo avatar Jul 29 '22 12:07 MatiasElo

I'm not a huge fan of the word myself, but should we use "canary" instead of "endmark"? https://en.wikipedia.org/wiki/Buffer_overflow_protection#Canaries

JereLeppanen avatar Aug 03 '22 11:08 JereLeppanen

V2:

  • Added README chapter
  • Use _odp_snprint() helper
  • Fix GCC-7 LTO build failures

MatiasElo avatar Oct 04 '22 06:10 MatiasElo