mbox series

[v2,0/2] gpudev: annotate memory allocation functions

Message ID 20241028190301.264378-1-stephen@networkplumber.org (mailing list archive)
Headers
Series gpudev: annotate memory allocation functions |

Message

Stephen Hemminger Oct. 28, 2024, 7:01 p.m. UTC
Use function attributes to catch misuse of GPU memory
at compile time.

v2 - remove test case where invalid pointer was being passed.
     The test is now caught at compile time, making a runtime test
     no longer necessary.

Stephen Hemminger (2):
  test-gpudev: avoid use-after-free and free-non-heap warnings
  gpudev: add malloc annotations to rte_gpu_mem_alloc

 app/test-gpudev/main.c  | 16 +++-----------
 lib/gpudev/rte_gpudev.h | 46 +++++++++++++++++++++--------------------
 2 files changed, 27 insertions(+), 35 deletions(-)
  

Comments

David Marchand Nov. 8, 2024, 2:36 p.m. UTC | #1
On Mon, Oct 28, 2024 at 8:03 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Use function attributes to catch misuse of GPU memory
> at compile time.
>
> v2 - remove test case where invalid pointer was being passed.
>      The test is now caught at compile time, making a runtime test
>      no longer necessary.
>
> Stephen Hemminger (2):
>   test-gpudev: avoid use-after-free and free-non-heap warnings
>   gpudev: add malloc annotations to rte_gpu_mem_alloc
>
>  app/test-gpudev/main.c  | 16 +++-----------
>  lib/gpudev/rte_gpudev.h | 46 +++++++++++++++++++++--------------------
>  2 files changed, 27 insertions(+), 35 deletions(-)

There is a build error due to referencing experimental symbol in annotation.