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 A65D743BCF; Fri, 1 Mar 2024 14:28:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 912934347E; Fri, 1 Mar 2024 14:28:30 +0100 (CET) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) by mails.dpdk.org (Postfix) with ESMTP id 80AD74026C for ; Fri, 1 Mar 2024 14:28:29 +0100 (CET) Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-4ce2cd0cee2so640635e0c.2 for ; Fri, 01 Mar 2024 05:28:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709299709; x=1709904509; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gGfM9l7OzFfI4fh8E1nBDDdNxJbZR9r+DUhDdZqhm0A=; b=DutldhNZM0Dupfb9jOH9X9Vok1ItQSHzCBpOjq1xpVlHe/rnRJQooSdayeojlCNN/V PpXcV5vbatWVlL2WLyBWd27gII2tHDjLuonnk0mjY3rIZsV3qhyw+zuUkBluPhQ9xDa5 mNfe1tB233PJ3vvBC6Sg7Ww+xC1lAbBLjPQzZZGVULoPRCO0RqLn1CfM1PyGckS4gn9Y T/Y98Ml3GLPmGOhKt/GGI+Jgv70krhYds/61KLXT/gCY1+biAJ7Ol9HZEb7+Bgy7b8d+ +TiWVR+kpKD2Fs18/Mkp0UreNR3cw003zAp/yb0kpoK3Tx+FMsuqw6aFYeHqfKUzj4ZO WWXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709299709; x=1709904509; 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=gGfM9l7OzFfI4fh8E1nBDDdNxJbZR9r+DUhDdZqhm0A=; b=SkF8a475qm2dFjCnGcD45ueBnbbhS/K2HjCruN1i4bFR1Coi+GNRQf2iRkiYMDyzQ3 5I92zO+qgI2RRHRKulyoyBuE77nt0cr1bOKfv+UpghvobiT9awg6MS40cP7MwwRoNJzq EFQ/Q0DpINj2fkKmf5tTHRQaOjOzyHQuyM/KXyLmSwkeZVK7gtTLm/GRQw+MhW1txURL JUV0kOUNiDPbqexoIfsjetrEkuo4qoQc5KXbv8naDab+k2g7Pivzc6lECQfwSs2JIz22 +k9th3oSKGjnQmmSIE7TAlfqtpGLJiB5R95V2p+8yB0NZkreW7+m6Z2PY226Kxw8DXMU lfCg== X-Forwarded-Encrypted: i=1; AJvYcCW+v/q3i6xqcR/iU4sTBvUdYDdwe0p7m/M7aUaOhzdRvzI/CLh24iqyr83mWIncLjMIoyHNlP18Ht+nFrA= X-Gm-Message-State: AOJu0YzAwgAeaiX62h8Xq8MqSl0zvFqXvdFbQWLd6GVM+NXW8fS9HrY/ hb8O13WZvX2OM0sMG0GP+Gu7Wad2g+6s7RQU3ZE/z9gjiR30ZOoITZBFj/jJfIK4OUuWFz6+PeE puMHTNBnPf6V5Y2J2TlR5aZRrAqE= X-Google-Smtp-Source: AGHT+IHcXAA/mqKFOIwo/EzwnVdLKDhsXPW3eSJFo5FfglC4a/tGD2EyG2ybKvJHqvU7yyJoERv8vvXq9Xcn93kUJE0= X-Received: by 2002:a1f:7382:0:b0:4d3:4aad:4a01 with SMTP id o124-20020a1f7382000000b004d34aad4a01mr1221040vkc.0.1709299708794; Fri, 01 Mar 2024 05:28:28 -0800 (PST) MIME-Version: 1.0 References: <20240228103919.2018017-1-ganapati.kundapura@intel.com> In-Reply-To: From: Jerin Jacob Date: Fri, 1 Mar 2024 18:58:02 +0530 Message-ID: Subject: Re: [PATCH v1] eventdev/crypto: fix enqueueing invalid ops To: "Gujjar, Abhinandan S" Cc: "Kundapura, Ganapati" , "dev@dpdk.org" , "jerinj@marvell.com" , "Jayatheerthan, Jay" , "Naga Harish K, S V" 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 Wed, Feb 28, 2024 at 10:42=E2=80=AFPM Gujjar, Abhinandan S wrote: > > > > > -----Original Message----- > > From: Kundapura, Ganapati > > Sent: Wednesday, February 28, 2024 4:09 PM > > To: dev@dpdk.org; jerinj@marvell.com; Jayatheerthan, Jay > > > > Cc: Naga Harish K, S V ; Gujjar, Abhinanda= n S > > > > Subject: [PATCH v1] eventdev/crypto: fix enqueueing invalid ops > > > > When tail pointer of Circ buffer rollsover as the Circ buffer becomes f= ull, crypto > > adapter is enqueueing ops beyond the size of the Circ buffer leading to= segfault > > due to invalid ops access. > > > > Fixed by enqueueing ops from head pointer to (size-head) number of ops = when > > Circ buffer becomes full and the remaining ops will be flushed in next = iteration. > > > > Fixes: 6c3c888656fc ("eventdev/crypto: fix circular buffer full case") > > > > Signed-off-by: Ganapati Kundapura > > > Acked-by: Abhinandan Gujjar Updated the git commit as follows and applied to dpdk-next-net-eventdev/for-main. Thanks eventdev/crypto: fix enqueueing invalid ops When tail pointer of circular buffer rolls over as the circular buffer becomes full, crypto adapter is enqueueing ops beyond the size of the circular buffer leading to segfault due to invalid ops access. Fixed by enqueueing ops from head pointer to (size-head) number of ops when circular buffer becomes full and the remaining ops will be flushed in next iteration. Fixes: 6c3c888656fc ("eventdev/crypto: fix circular buffer full case") Cc: stable@dpdk.org Signed-off-by: Ganapati Kundapura Acked-by: Abhinandan Gujjar