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 E78A645AF9; Thu, 10 Oct 2024 02:30:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4A71402D8; Thu, 10 Oct 2024 02:30:50 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 1465E40156 for ; Thu, 10 Oct 2024 02:30:49 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2e18293a5efso304575a91.3 for ; Wed, 09 Oct 2024 17:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728520248; x=1729125048; 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=3KU5w93XYV4OMeRLjsmcmcsC2rGhJv88n8FPaH2JAMA=; b=nJhO4wzo+YnEq4l9CUYlDBhEuuqDs6p5oTP0zr5iizBx8s8B3xZC8rU5Aet9FfiNQE 7PMThfg5LONIk9kPap1MJYtactPemR1xKrUmH479+rnPmiI+DqA0ifeb+O1iKTHE4amV 1voUG45qkW0uWESTgoZYwcGHU/oRwBFYj4MZ68LRFiifVaHbiGjN81dkezvWJoxPAybd y3qmvw6Ayf7g7dzpQqf4PKm15MjOFMjze8ISSxhujSLWaobGNlp2zKWN9bGijUplxpkP SN9LIJD+Ue1Szt19SCBEbI6lZNKgYve4MLrYvEIEQHQsBbPKysDF9UDs2HIdvP1OpdbQ mMcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728520248; x=1729125048; 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=3KU5w93XYV4OMeRLjsmcmcsC2rGhJv88n8FPaH2JAMA=; b=JjwkmDIl11Zt0EN02GiXLOS53ks6eRLgp0KvuoqOk+G6O6fElDm0WujUUgDjH72J5W xORUS3zcQ0qLnihotfEmRaxmfqplL/e8GrVjOmBR87f0XlyRHggF5SOt3QjvVzHIkyJX 2PVBP1azPvAfBMFYvwBiKvmToirfIvkajP0oxj5II/eKcsWbfj4Z//y32EhbfL1vCPcO p8G/0tC/spnoQ0a97q//MASG1DmaPlllMLvymWETxGgWkdfAc99U/35Xfo56L4iThJd8 nXPil/al0C3kEpvsTSBzoZfKbjGpEeJy4G0Dlzj60SfMioZBl/lvxscynpfOBotJ5P8Z 1jzA== X-Gm-Message-State: AOJu0YzShftAB9b+Vqm0Rfn5zSbCSx9mtiij/3iynCuzCaJxs+rdgTbN vCxodEEZr6m0202/bJDZhzvJg703kOvPWfYzTIU0o16lun7aEgKV3c5VbNh06CC9GrC6Uc/Gv9G I X-Google-Smtp-Source: AGHT+IEF0jWzqh5B9AOrt6eN8j3VHRQDA4Ai34wbtw0FDBpXnZYaDWL9KVB+D6Fqawe9MbQI/Ew1hQ== X-Received: by 2002:a17:90a:70ca:b0:2e2:c98e:c33f with SMTP id 98e67ed59e1d1-2e2c98ec41cmr1575130a91.1.1728520248120; Wed, 09 Oct 2024 17:30:48 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2a5712699sm2347464a91.29.2024.10.09.17.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 17:30:47 -0700 (PDT) Date: Wed, 9 Oct 2024 17:30:46 -0700 From: Stephen Hemminger To: Konstantin Ananyev Cc: dev@dpdk.org, songx.jiale@intel.com, Konstantin Ananyev Subject: Re: [PATCH v2 2/2] examples/l3fwd: fix read beyond array boundaries in ACL mode Message-ID: <20241009173046.76e1b00e@hermes.local> In-Reply-To: <20240730122235.1084-3-konstantin.v.ananyev@yandex.ru> References: <20240726194302.920-1-konstantin.v.ananyev@yandex.ru> <20240730122235.1084-1-konstantin.v.ananyev@yandex.ru> <20240730122235.1084-3-konstantin.v.ananyev@yandex.ru> 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 Tue, 30 Jul 2024 13:22:35 +0100 Konstantin Ananyev wrote: > From: Konstantin Ananyev > > With commit: ACL mode now can use send_packets_multi(). > What I missed with that changes: send_packets_multi() can't deal > properly with input dst_port[i] == BAD_PORT (though it can set > it itself), as it uses dst_port[i] values to read L2 addresses for the port > and assumes dst_port[] to contain valid only values. > To fix that just add a check that all dst_port[] entries are valid before > calling : send_packets_multi(). Otherwhise use send_packets_single(). > An alternative, and probably more logical approach would be to > re-arrange send_packets_multi() so that it updates L2 packet headers > at the very last state - when dst_port[] are finialized. > But that would affect all other modes, but that would affect all other > modes and will require much more code changes and testing. > > Bugzilla ID: 1502 > Fixes: aa7c6077c19b ("examples/l3fwd: avoid packets reorder in ACL mode") > > Reported-by: Song Jiale > Signed-off-by: Konstantin Ananyev > --- Acked-by: Stephen Hemminger