From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1CE2C47083 for ; Wed, 2 Jun 2021 08:20:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C448613AC for ; Wed, 2 Jun 2021 08:20:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232518AbhFBIVp (ORCPT ); Wed, 2 Jun 2021 04:21:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:37670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230159AbhFBIVm (ORCPT ); Wed, 2 Jun 2021 04:21:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D540613C1; Wed, 2 Jun 2021 08:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622622000; bh=uOICQFyuTW1fDMnFlP4AIf5ElcaKnmpesLxSuT2IWcM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aIzubGdyD2JbnrmHZxJskmPYPI+GxlQ5NspWPeT0rQDaqeRMeHkeqKlAICTjoiDAJ wpEED2aWdeNUsHjmT9woLQG/r8uKH4E23+lF0CBc9nbWK1wNIZ7PrCowzxyEAOYgkD lo8BbRsLRPuA7R8I18ptriL0RoZKGoq42rXZr5X5QecmnM7eGLCL89LOOZ/NcsENI4 LkHWGKXnNp7q0qY8HYyJ8u2JT4lSQ5atOehaZGJWvq8qcAvrncpxjIFfNo3o/k9dJm f+UAV1U3xG2TTTN2qdjNUAjkyix/RQ4fPgZbAg71DEywvaC1PAcPHKwVZFaOpJPtcC xXOAzdfDUT3PA== Date: Wed, 2 Jun 2021 11:19:55 +0300 From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Jiapeng Chong , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Yishai Hadas , "Saleem, Shiraz" Subject: Re: [PATCH rdma-rc v2] RDMA/core: Sanitize WQ state received from the userspace Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Wed, May 19, 2021 at 11:37:31AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > The mlx4 and mlx5 implemented differently the WQ input checks. > Instead of duplicating mlx4 logic in the mlx5, let's prepare > the input in the central place. > > The mlx5 implementation didn't check for validity of state input. > It is not real bug because our FW checked that, but still worth to fix. > > Fixes: f213c0527210 ("IB/uverbs: Add WQ support") > Reported-by: Jiapeng Chong > Signed-off-by: Leon Romanovsky > --- > Changelog: > v2: > * Extended commit message > v1: https://lore.kernel.org/lkml/0433d8013ed3a2ffdd145244651a5edb2afbd75b.1621342527.git.leonro@nvidia.com > * Removed IB_WQS_RESET state checks because it is zero and wq states > declared as u32, so can't be less than IB_WQS_RESET. > v0: https://lore.kernel.org/lkml/932f87b48c07278730c3c760b3a707d6a984b524.1621332736.git.leonro@nvidia.com > --- > drivers/infiniband/core/uverbs_cmd.c | 21 +++++++++++++++++++-- > drivers/infiniband/hw/mlx4/qp.c | 9 ++------- > drivers/infiniband/hw/mlx5/qp.c | 6 ++---- > 3 files changed, 23 insertions(+), 13 deletions(-) Any reason for not merging it? Thanks