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 7C9884611F; Fri, 24 Jan 2025 12:13:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44F8040F1A; Fri, 24 Jan 2025 12:13:36 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id AE4F440151 for ; Fri, 24 Jan 2025 12:13:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737717214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bp++XpjAFSZ5vgaIHFrVehyz71jKvLS8kgITSigN5cQ=; b=XNzsPj/XE82UF/jJ8qeU37HHxt2keft2qx8MuF/29sBKKFzPvmydMcZ9OA7FHRhzZIrEpf nUaejuOGj+NqFFcZj9JEqPh9vV/LMr5yp71th7/pKhVt4FX2mNUxm8rDD+Rkr3e2s07vFX 3+m7ezGoBvAq7nt8W6Ekeg8nY2AP0bY= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-330-vY6_0Pe9O329ULtZu9PHsA-1; Fri, 24 Jan 2025 06:13:33 -0500 X-MC-Unique: vY6_0Pe9O329ULtZu9PHsA-1 X-Mimecast-MFC-AGG-ID: vY6_0Pe9O329ULtZu9PHsA Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-301e3d7adceso10514061fa.3 for ; Fri, 24 Jan 2025 03:13:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737717211; x=1738322011; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bp++XpjAFSZ5vgaIHFrVehyz71jKvLS8kgITSigN5cQ=; b=bapthMLihfWJ0FfdwAqyH8eI33DAxVhjYZq+eOpz6Xl67OYoSw+SQH+4VxAlX+GvIS S3cQRcDz2eUHJzaqZKosKK7TbqpEPC8AvbBOpd9DlAUyQYy96c7ON9b8AJb6scSg5ACy ou2TEe1piXtD/bwKGrqAOdXodmVmVnv+HS/ea9AeEA4ZHwm7R5xDtt8hiSkI8rZNjiHO ySu3+j9a4hSrgfhSf7gtKJtPft/XqJHKVwNyHldvFQy7U0hNjKfivgHAG0BqE8rt/ouc 0YHMugUIjPGBiqyQye+gxwPngjtBf8OD+X1MF3UX6UJrDFRa0dKPIMb2dcrxj/uOfyAC n6zg== X-Forwarded-Encrypted: i=1; AJvYcCV1Ff1INgHzY00Z5KNzFARYHtaGpA47AGr4pXBn2ncmVAnnp9qMuMnVYOpJnoU8IOv4yhI=@dpdk.org X-Gm-Message-State: AOJu0Yza32GNThCfaMluYaTDMjwMdMqqZHRo50vqYgRxtAafwP/r6Vin jxk9b4eAqb2AWoM7HEFdGL8bc5Z5ZDO90C6ZXRY5q/5pF4ZCZAZX5cLOGY7jPzkALLBYc6UT5rm aJYCLKW1RQNy/munWhYO0DitcK2fya62KWFuXV/l0qC20tSwhL8R212iXMNeW3qZpT8Jx9KMGuT EDKiQap6H7w/UyTAc= X-Gm-Gg: ASbGncsrliNBsTA/veNkTVAix9UvDEqGJ/e72C3/SKY6CoY1hphOzNRhC06vzvQ2wK3 zkfwU+y+2DJ/2FiPb/t0XxWf8oA3W2GyFiHQSpXElKDl9WNrNUUbzVg== X-Received: by 2002:a05:6512:3e03:b0:53d:e5c0:b9bc with SMTP id 2adb3069b0e04-5439c28743bmr10955883e87.50.1737717211406; Fri, 24 Jan 2025 03:13:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2+PcQhNQgT4OuL52aN8qVbv1+5JiGsXljAY7re2rQIddpDdTZXZqYp6MxsR/Gu/s61iYXdSRb8FC2fK3erqo= X-Received: by 2002:a05:6512:3e03:b0:53d:e5c0:b9bc with SMTP id 2adb3069b0e04-5439c28743bmr10955869e87.50.1737717210993; Fri, 24 Jan 2025 03:13:30 -0800 (PST) MIME-Version: 1.0 References: <1733513273-25550-1-git-send-email-andremue@linux.microsoft.com> <1733513273-25550-2-git-send-email-andremue@linux.microsoft.com> In-Reply-To: From: David Marchand Date: Fri, 24 Jan 2025 12:13:19 +0100 X-Gm-Features: AWEUYZlAFm0DLVBattqXNMjbgjkxODJqKGwHFj1TmMHg3kiwERwvPbuTUVQhI8w Message-ID: Subject: Re: [EXTERNAL] Re: [PATCH 1/2] lib/dmadev: eliminate undefined behavior To: fengchengwen , Jerin Jacob Cc: Bruce Richardson , Andre Muezerie , Kevin Laatz , "dev@dpdk.org" X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FaD9yv9tuoQcRNooz8ynvC7c2gXR5pJvmRGb7dXkmus_1737717211 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, Dec 10, 2024 at 1:58=E2=80=AFAM fengchengwen wrote: > > + @Chengwen Feng > > > > This kind of patten is not used other places like ethdev traces, Why we= need this kind of pattern in dmadev? > > Looks like, it can be fixed by caller of this function by initializing = struct rte_dma_info. So may not need a fixup patch to begin with > > It's strange that no other library doesn't have this problem. > > When I first add tracepoints support for dmadev, there is no such macro (= just like other library), > but the CI report ASAN error. > > The rootcause is that register: > RTE_TRACE_POINT_REGISTER(rte_dma_trace_info_get, > lib.dmadev.info_get) > it will invoke : > __rte_trace_point_register(&__rte_dma_trace_info_get, __rte_dma_t= race_info_get_lib.dmadev.info_get, > (void (*)(void)rte_dma_trace_info_get) { > rte_dma_trace_info_get(); > } > > But rte_dma_trace_info_get() it was defined with parameters: int16_t dev_= id, struct rte_dma_info *dev_info > If we force invoke rte_dma_trace_info_get() without pass any parameter, i= t may lead to ASAN problem because > the parameter's corresponding register was not set (and it's value undefi= ne). I remember of an issue with tracepoint and *UB*SAN, but I fail to see how ASAN is affected (plus I see that the CI runs the tracepoint autotests with ASAN). Can you clarify? In any case, this looks like something that should be handled at the tracepoint framework level, and not silenced/wrapped around in the dmadev library. --=20 David Marchand