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 287D945AB2; Sat, 5 Oct 2024 03:19:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F348C402E6; Sat, 5 Oct 2024 03:19:49 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 2776E400EF for ; Sat, 5 Oct 2024 03:19:48 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-71def8abc2fso613340b3a.1 for ; Fri, 04 Oct 2024 18:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728091187; x=1728695987; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=oV5A2JbovxB5KIqg338jb+aYZDdA1PAMdbZ8dTkFD8A=; b=ZeBuln9Rs0XB3cd41V7AoLL9ljWw8fELkIi8lac0AOMVIQKGgaDlvQ590n8uzMutZ4 SsEOWmGvhlTIlLklgd2yGRyYFcZJie0z5YqIX684z0QNzW8ZL8z5UJJG6pxnfH5sDDdo ai86qmsWPQorRPZDzsi427PsQwo3fn0XPFIQcx0GvUTQsFgsEysjOh5SAd1q3k0gvTCh n5Cb1CDfrMI/Cnk2OpgkDs+lTI9+YpxtC5b60tDK+fkqsiE67ssYDm62ZJN0eQ3GBN6S AjsHaXXvm5hbJ7YDVyMfaLhkLGMaCn9uAUpmx9k7fxxkPVUPo59CzUU7SCEHCim1RyzO Ccjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728091187; x=1728695987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oV5A2JbovxB5KIqg338jb+aYZDdA1PAMdbZ8dTkFD8A=; b=s2CFPY3WRYXoFf/pH/G4I2I33QoPJ4+LFV/0oT6SfSfzrp0KxQ/+rOyzLOioWxcq4m DJLXLZBRGV5OYYoGG+H5XvS1LHs4cHmxHKQvAd4C3yqY0pw9re9vWldb77l8gN44ifGC doY73RIteQGDTaa7hh4KNc+4zs16+L4ulvck/eiSHg9NhcvXcff9GkdQyWNQU4/Pcumt o6iJUgg7nlOboGALseAvBSl+ajaqos12sozXyqStzrJYsBxXzbOz/wfS/Uh4zAqMz4nh PiDJUa53R3GGfyGwQ4TrMUjMKEHLeDfJ0GJQ93gLWWzFtCOWz/BQM39CQUfL3dSJK1kt jyPA== X-Forwarded-Encrypted: i=1; AJvYcCXYVuoPiMCqwlC1uwL5zyd+e59IPpQ1ywfN/RGCdpsnHndssk/lt7jbDX5uHVuRjP764TI=@dpdk.org X-Gm-Message-State: AOJu0YyNoMRGBtD9FTICfeGRspWZdJNNH2ZMmo4X+Wl3uNYUaKVCcq3r KbgZfe6Mqn07Zj5bGNzQG8HTy3ixFWDuMvYRGrcYR9flz31cphmA/IUIM9kT6HY= X-Google-Smtp-Source: AGHT+IH/U0bFqe38xuMYHAE8eRKDpCNEJkk+wuVSjDqjKmfuDePIPei3nEK+IRnVf6W5JikXWKxvwg== X-Received: by 2002:a05:6a00:3d47:b0:717:8dd1:c309 with SMTP id d2e1a72fcca58-71de23c6464mr6975908b3a.9.1728091187189; Fri, 04 Oct 2024 18:19:47 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0cbc9a3sm517000b3a.20.2024.10.04.18.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 18:19:47 -0700 (PDT) Date: Fri, 4 Oct 2024 18:19:45 -0700 From: Stephen Hemminger To: Chengwen Feng Cc: , , Subject: Re: [PATCH v5 0/5] fix segment fault when parse args Message-ID: <20241004181945.00af423b@hermes.local> In-Reply-To: <20231106073125.55280-1-fengchengwen@huawei.com> References: <20230314124813.39521-1-fengchengwen@huawei.com> <20231106073125.55280-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 6 Nov 2023 07:31:19 +0000 Chengwen Feng wrote: > The rte_kvargs_process() was used to parse key-value (e.g. socket_id=0), > it also supports to parse only-key (e.g. socket_id). But many drivers's > callback can only handle key-value, it will segment fault if handles > only-key. so the patchset [1] was introduced. > > Because the patchset [1] modified too much drivers, therefore: > 1) A new API rte_kvargs_process_opt() was introduced, it inherits the > function of rte_kvargs_process() which could parse both key-value and > only-key. > 2) Constraint the rte_kvargs_process() can only parse key-value. > > This patchset also include one bugfix for kvargs of mvneta driver. > > [1] https://patches.dpdk.org/project/dpdk/patch/20230320092110.37295-1-fengchengwen@huawei.com/ > > Chengwen Feng (5): > kvargs: add one new process API > net/sfc: use new API to parse kvargs > net/tap: use new API to parse kvargs > common/nfp: use new API to parse kvargs > net/mvneta: fix possible out-of-bounds write Not sure why the patchset never got more attention. Yes it is a real bug, and this looks like a reasonable way to address it. It does need to be rebased to current 24.11 tree to have a chance, and would be good to add more documentation to the API and remove cases in drivers that have unnecessary NULL checks after this. But those changes can be follow ups. Also the mvneta patch probably should be sent as separate it does not depend on anything here. Bottom line resubmit it, and I will ack the new version.