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 2B18D45AF3; Wed, 9 Oct 2024 17:09:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B621C4066D; Wed, 9 Oct 2024 17:09:19 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id AFF27402A9 for ; Wed, 9 Oct 2024 17:09:17 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-71de776bc69so3632538b3a.1 for ; Wed, 09 Oct 2024 08:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728486557; x=1729091357; 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=qOiI9wWRfFRBVoCYLEwVfGEouqJjuqRQdoybDlH04qw=; b=ICnqjeLHBzgiJfUx3hkT2jB55B7auUSQEdfV4e3uUJg+RoDRIo7ZTanQTfYDtyXS3F qnTxRCFdIAghRxivThmleRjjmL6CoBBQtoIkJqnNRu1iznscwDHxHygOak9vWUKk4VNv LiJ9LrTQLP1GwwwzUF4euOhq+TWbsHknTznhJBPQBXpdNWqJVLkcng/YW2J6qvj2XW1S omsoqjfzNIbfD1YBmHY0U8xvC+SeybSHsf/SxJO1OjhuteyEVOqgGm4+u7llAZrc0JsX wgq5XyX+siygv0MZ4hRWVkAApxwUhBa6z0xiX580z9tw/jVuLXNzhbkNcJMybjwEEtOe sQXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728486557; x=1729091357; 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=qOiI9wWRfFRBVoCYLEwVfGEouqJjuqRQdoybDlH04qw=; b=X68byKhNzpVh973CIjWjiv1m9u6XQbq2gpzQWI0xtgdEXM7h8QOJJNetas5VE/737F 6w4/eJdz24zxnC0mrKzh/XpBsvCdr4mhM0kGu1HnAoJiIbXLeew4gIxUh1w1jIiSIwzb H/clww6SjemGvCoCQqB/3LGq1FwXTFpwTuFiktnbWPXP8xe9leT+AAKnKp4znpKNClJq Fl6jYTxCxa1oplVmsFFMvGcliEKaIUeJwQi4/fKKmJisC7rJUOqQ0eb7/NCeBSlGu1P8 vhe6TsLRK8O4a129VxMy7XGZG0EoyDvN9IULMkQDL896wi3PO2RQClsYNF5Riie9uCoX Z9Ww== X-Forwarded-Encrypted: i=1; AJvYcCVGMzEW2w0AXrCXPGQ7odUcE8fsTjF342idmBYtwa86ia3RTmBTxUaTsCXelhONbWaYzmE=@dpdk.org X-Gm-Message-State: AOJu0YwLiRQD0w/w3gBWILyrrGvjR9A+NPSH2qXezi3JDBKVNj2E9ige V0s/+kRMt3yJ08UMFlAIYWpIW/B8ViuR8AME57qYhJsxFDmPZn8yUUPto78ibJY= X-Google-Smtp-Source: AGHT+IG09vvyfPwd0y4rHOOSjbZ5DESRXaiQGwW3MlLKp+rTNd8uIa3dpuur83YjqvQviDs79O7SiA== X-Received: by 2002:a05:6a00:811:b0:71d:f4ef:6b57 with SMTP id d2e1a72fcca58-71e1dbb7fd8mr4298504b3a.18.1728486556683; Wed, 09 Oct 2024 08:09:16 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0ce1934sm8125702b3a.96.2024.10.09.08.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 08:09:16 -0700 (PDT) Date: Wed, 9 Oct 2024 08:09:14 -0700 From: Stephen Hemminger To: Chengwen Feng Cc: , , , , Subject: Re: [PATCH v2] net/mvneta: fix possible out-of-bounds write Message-ID: <20241009080914.0b08d3fa@hermes.local> In-Reply-To: <20241009060845.2702-1-fengchengwen@huawei.com> References: <20241009022342.39152-1-fengchengwen@huawei.com> <20241009060845.2702-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 Wed, 9 Oct 2024 06:08:45 +0000 Chengwen Feng wrote: > + if (ifnames->idx >= NETA_NUM_ETH_PPIO) { > + MVNETA_LOG(ERROR, "Detect too many ifnames!"); > + return -EINVAL; > + } > + Looks good, but the wording is a bit awkward. Suggest: if (ifnames->idx >= NETA_NUM_ETH_PPIO) { MVNET_LOG(ERR, "Too many ifnames specified (max %u)", NETA_NUM_ETH_PPIO); return -EINVAL; }