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 1055645EF0; Thu, 19 Dec 2024 23:53:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98FBA40265; Thu, 19 Dec 2024 23:53:05 +0100 (CET) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 1A90E4025F for ; Thu, 19 Dec 2024 23:53:04 +0100 (CET) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7fcf59a41ddso781000a12.3 for ; Thu, 19 Dec 2024 14:53:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734648783; x=1735253583; 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=z1nprufiIAddSBoZvyXCaMV91IALSkiCAGXT4CjPnBc=; b=da/uEnrcHiXTX3+gyvPNPkcCG4MfvUdrtt/BZKWBgh9H88tXOijFw2tNt2ZbAwMSvJ FmLkMcPBXDTlO8Sv62Pg3NHrFMFC9RBIB54RgebthIPMTAPxIR4/HhlOX3frwzC4wPxK 7u106LDjdnz6eb9Ao4Xf7GLsvyLjP9V40Kt7Gf/1rZR5FgOXsVkvlZF1hIPcJHj4o2Mr Y2copC7dKna+hrw5/WF39D2Ys8Ymsj6E98tGj7k1vqVcBd/JGIjOpn+SLfa2EQjEKzcu ij9yDmrwmBNSPzKYEegDMTXbsm4X8/HU2Q7HIilNooOGFAmXxgv/RrVnD5B/EfKBnZj2 fZjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734648783; x=1735253583; 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=z1nprufiIAddSBoZvyXCaMV91IALSkiCAGXT4CjPnBc=; b=Ze3Idm50Pz2zVjJxjYWibTQC4tYAl9Sjcydu7eQM3v+cZ6CKNRKWd8eimTB1EL3ov+ 89UJzVK5RGiryQJRfkktvJIkrDH37Pb3bZyXkr1OPLIBOhUcQOrXFhPGMyJoNKjfBZRy v20CIHCvxepy7q4OL1VOp4A6EcJnXfjBj30Ll/h70DTgmuvVEMx2BJPvqaO+VuOyUl2A X/k9lrShPPCWXKib/vnH5Ocbtwr4eXWhqPykgQ5rFGt60lCTbx8/g3WBM7AlZ/HhXXD4 CTXDElbP2t4TFCKcQ+PP1IzY4aTVW2b10Lfc/Pklh1s1hMSirM53DQJGRoV6dFltBVb8 K7lw== X-Gm-Message-State: AOJu0YwnNd0XG6+UWlKyQw/l9NZbcbo8QeGqxwRoLYv+nUHlQ1RETGDn pSaq1gd84NFPYJMd9w5X9BX5kTptBMOzTqDGDvXnFCbGCMZluTdJIZK1ILRHX1ldDA7ped+q1cX uiJk= X-Gm-Gg: ASbGncsyFVfNzG7RDKL1JdBjFnzdOZK6NQ8yfzZzezhVgHFM7PY3nRzOwzSvhWGFywB jiOKBH+kjZAC3wKqODc4rheNTaq6xeKfazqdS3uPlU4qc/ZINkjMdeLfOugPOZCP9YI2aM6ySEz RWdfTreXclCenB9Eb1bxRcG6hDLfnjc6XOwjdhjH+k5TZlmUs9pDRc4drLs/Q2apIfMWFaA63j2 WjYSHUy1Ti2MWJIOBqYylZcM0C0qXv3WrEOAV/vvrruQ3oAjtplDR64GK5ABSOrVgb1gHUVw2x6 lW/NWckrjOHuQ0mWKqHNvhVxDhFrGgy0kw== X-Google-Smtp-Source: AGHT+IFwkGAUF0BegnK7mrJ1xsJB6d9dxS9Di/FOE5FW1Bd3tbWNGOm+9ck1ZPLlr0jCoygSqVBgOQ== X-Received: by 2002:a17:90b:2b86:b0:2ee:cd83:8fe7 with SMTP id 98e67ed59e1d1-2f452ee9d18mr1129952a91.35.1734648782776; Thu, 19 Dec 2024 14:53:02 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ed62b30asm3901021a91.12.2024.12.19.14.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 14:53:02 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 0/5] Fixes for build with -Dsanitize=undefined Date: Thu, 19 Dec 2024 14:49:50 -0800 Message-ID: <20241219225253.782792-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218170530.140747-1-stephen@networkplumber.org> References: <20241218170530.140747-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 Recent bug report https://bugs.dpdk.org/show_bug.cgi?id=1605 highlighted that no build is done with -Dsanitize=address,undefined. Doing a test build showed some new issues that were not being reported. Note: a couple of these required introducing the equivalent _FOREACH_SAFE variant macros. These are in FreeBSD and in DPDK windows versions of queue.h but never made it to Linux sys/queue.h. Put the macro in the file where used (rather than a common spot) to make backporting the fixes easier. Stephen Hemminger (5): bus/fslmc: fix use after rte_free net/bnxt: fix use after free net/bnx2x: use RTE_BIT32 net/qede: fix use after free vhost: use strlcpy instead of strncpy drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 3 +- drivers/net/bnx2x/ecore_reg.h | 130 +++++++++++------------ drivers/net/bnxt/bnxt_filter.c | 11 +- drivers/net/qede/qede_filter.c | 20 ++-- lib/vhost/socket.c | 3 +- 5 files changed, 90 insertions(+), 77 deletions(-) -- 2.45.2