[LTP] [RFC PATCH 1/9] lib: Add support for guarded buffers
Cyril Hrubis
chrubis@suse.cz
Thu Aug 1 13:45:23 CEST 2019
Hi!
> > This commit adds a support for guarder buffers. Guarded buffer is a
> > buffer allocated so that there is PROT_NONE page immediatelly after the
> > end of the buffer i.e. any access after the buffer generates
> > SEGFAULT/EFAULT etc.
> >
> > The library is hooked into the tst_test structure so that all you need
> > is to fill up an NULL terminated array of buffer pointers and sizes to
> > get the respective buffers allocated. The library supports allocating
> > memory in test runtime as well as well as allocating more complex
> > buffers, which currently are iovec vectors.
>
> Runtime alloc in loop could be an issue, do we need also runtime free?
We can easily add it if we find it useful, so far all the usecases
were either already allocating buffers in setup or converted to do so.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list