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 BD795A0553; Thu, 9 Jun 2022 19:59:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6C244069C; Thu, 9 Jun 2022 19:59:22 +0200 (CEST) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by mails.dpdk.org (Postfix) with ESMTP id C151C40689; Thu, 9 Jun 2022 19:59:21 +0200 (CEST) Received: by mail-qt1-f173.google.com with SMTP id t21so10699130qtw.11; Thu, 09 Jun 2022 10:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3acI7I2tSF8sP2i0q2O5z/hK779Yxlp47ktCQbJYSxY=; b=JVe360jcoCjJBTnzcEjUZnil1ZaqQFju/gET52Er3Qw39CrMYqmm1SU5h3Vz3G3vak r+syt0WtK8OtSVVNJwWutrL2RwmlBZFWrylnDRIwfK+7OsoSm6B95xIODHm058T10Tww tHFBzJdiYxWPsprPYz5hkU21lCgVW3kjU6zXFRRlVUR9vF9AUkRrPuTVAp83vuHy2tL+ 4FXjMCxySV/b2hV6ycSv7Logyu0VM7GtQQ757OY2GBtZD8hVaGPlUKYcuX1IXb3fvNLT 1pbxY6/RMitDzfnxcJiO+hsJTWAIodV0T3S+k8wZS3fjLz8hpJL6imc39pazn8Gx4EUe gPlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3acI7I2tSF8sP2i0q2O5z/hK779Yxlp47ktCQbJYSxY=; b=qmQRCfou9/Q+TEHwlelHkZf5KKbdpy/xI2tv8X8VUGgPP4SYZArcgLPQPznUfLAaO5 pZr/U6WPsZQ2hPZ4QzW7cCHzsZWYhs1yig8p8ucHfm30rf40nVHqwpO3bm4kigqyBowt /Ji2BGFpYVmJaF6Q4UkMRW6JtJajY8fnFBqC3DATvE6rnKgr6LfYBwYOjODXwFMvDvSi cL6NTZW4GDbQOKk6UF8gDCdab1jMng4mRYxmZoPbH7B6db6Qfd1dXx0ZQMjLG8ufTSa0 1Ibx7LMxjzCsXrDikq8Euz4XN4s0K7bn+ClJduF32LjRLeMTrZtmtZWxoPpnz1l5Npzd 7rnQ== X-Gm-Message-State: AOAM533w4/+K683ksq9PMhmvinaa0NZ3EkXvdHszbQvLf7jnExwZDzFW o9bxhiSmMjCe//lVVNqyKacns25DMmss71dhYiEG1Q8MzME= X-Google-Smtp-Source: ABdhPJzbQMHG7O1CiitzOqn4c1C47f5UtYz7Po38RC7Yek9KkOzK9mGb1YSTuYb9onOG4Rzphx9uBUclFNsKG/x5mmc= X-Received: by 2002:a05:622a:87:b0:305:1a8e:b4ea with SMTP id o7-20020a05622a008700b003051a8eb4eamr2388qtw.410.1654797561168; Thu, 09 Jun 2022 10:59:21 -0700 (PDT) MIME-Version: 1.0 References: <20220606160311.1227058-1-timothy.mcdaniel@intel.com> In-Reply-To: <20220606160311.1227058-1-timothy.mcdaniel@intel.com> From: Jerin Jacob Date: Thu, 9 Jun 2022 23:28:55 +0530 Message-ID: Subject: Re: [PATCH] event/dlb2: fix QID inflight exploit To: Timothy McDaniel Cc: Jerin Jacob , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" 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, Jun 6, 2022 at 9:33 PM Timothy McDaniel wrote: > > If QID inflights is set to an invalid value it can cause the > PMD to hang. This commit adds checks to make sure that the > value is valid before programming the hardware. > > Fixes: 1857f1922ce2 ("event/dlb2: use new implementation of resource file") > Cc: stable@dpdk.org > > Signed-off-by: Timothy McDaniel Applied to dpdk-next-net-eventdev/for-main. Thanks > --- > drivers/event/dlb2/pf/base/dlb2_resource.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c > index d4c49c2992..548bebd068 100644 > --- a/drivers/event/dlb2/pf/base/dlb2_resource.c > +++ b/drivers/event/dlb2/pf/base/dlb2_resource.c > @@ -3701,7 +3701,7 @@ dlb2_verify_create_ldb_queue_args(struct dlb2_hw *hw, > } > } > > - if (args->num_qid_inflights > 4096) { > + if (args->num_qid_inflights < 1 || args->num_qid_inflights > 2048) { > resp->status = DLB2_ST_INVALID_QID_INFLIGHT_ALLOCATION; > return -EINVAL; > } > -- > 2.25.1 >