From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5FE745C00; Mon, 28 Oct 2024 20:03:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8463B427AC; Mon, 28 Oct 2024 20:03:13 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 2D8F5427A1 for ; Mon, 28 Oct 2024 20:03:12 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7206304f93aso2085599b3a.0 for ; Mon, 28 Oct 2024 12:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730142191; x=1730746991; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k7BmJxeU1fW1zTOVVCFUze+D0el2Txdp7dR/Xmr9PME=; b=y2ZzxY9RqihPlb9olzVLs0mclraIQRS8BPS4vTeNo1H3wllme6qwq8DoSgpdLCWTK5 XshWUKXjs/Xvp8EqaG/6exPNNNGhB6pxC7eb+07+nPGPZmACSFoLRzZlhPBhm3MYz0mR GrpRa3vjgff8Vcil9Hb9DQTzcvJBq9GRu0YF1iGj12Q9kCjefAO6wXFkt8aB54P7KJvt d10ZvYIRz+O2VZJ9qXsnvZbAegAdf9XoXNKvFhZiLUFoWZQJteOZ/xGVYuWtlj3xX1o4 4hb7LlPvVRAlYWOm63w6bpoTkRgyCgk1tgioLbkzgzFRJy+8BrJeDiPJAn1KIxfUiCLS 2aaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730142191; x=1730746991; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k7BmJxeU1fW1zTOVVCFUze+D0el2Txdp7dR/Xmr9PME=; b=hMpgGv/zAkgjnUmwLPfVtxqsQlBLqrt8BVDOmZVfXUMMjI7ZdNC2zQjxXEKNPTRkTC p+DT4O9VYkI+N0cuHr2VvqFC1gZLzlvu+cYRdFEtcE7Dlyi+toBFUCm9Pjc+9PJcro5B Kjs4PfruJNUcsYhhoIJcW9S1+d007ct1mSiMI4OkZIBmB6/GpqwbFwgzxHeqewhuWpjL 0/FBOIHJpFKS0y47MKe87hWs/tGZHMcQz2NciYyaaReL3j85ks0oi4BCoI4fHqYcRp4O LMNmJEbQ8nZheGYK2PF6pJ2Mdb+5QFMPWSIkCB9h1WNQiblpcuj29BTzRjdHMOEzfcSo yeiA== X-Gm-Message-State: AOJu0YxcUk92PuAjWasbAvlDl8phML3pk20LgA7T7CuUDWbKvX57EISf w46hnP+iM2YKw/WjQQ79F4kgxDjLlQ+5Xp08cQwW/NwVKj4GrXy8kpmbe8C9bzjxGfZ/EhjFin8 o X-Google-Smtp-Source: AGHT+IGRkam85lX24xoavYzJb5fjL0w0yrNhpVllzucuP5Tl1GHakGWHr8FHg6mZkZlNpeFRTTyHQg== X-Received: by 2002:a05:6a00:9296:b0:71e:b8:1930 with SMTP id d2e1a72fcca58-72062fd980fmr14179313b3a.16.1730142191131; Mon, 28 Oct 2024 12:03:11 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057939b82sm6152565b3a.81.2024.10.28.12.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 12:03:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 0/2] gpudev: annotate memory allocation functions Date: Mon, 28 Oct 2024 12:01:01 -0700 Message-ID: <20241028190301.264378-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241017225844.235401-1-stephen@networkplumber.org> References: <20241017225844.235401-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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(-) -- 2.45.2