Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp481076rdb; Fri, 17 Nov 2023 04:39:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IElES2wB9NqRUtoC50NG/vODgG7Gv5Pt9wTCUzovRtuttim1IXLvysAOFxEjFGERUfOyAdi X-Received: by 2002:a05:6808:6406:b0:3b6:b9db:ea1c with SMTP id fg6-20020a056808640600b003b6b9dbea1cmr23275902oib.42.1700224775122; Fri, 17 Nov 2023 04:39:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700224775; cv=none; d=google.com; s=arc-20160816; b=UX+XUo3YZTIKS/6/tqcDClqRgjHARXE9R1M54OnQxbz23DKHCu5BAxG7ZCCb6h4Cqq F3intHnnvKIWsgL4MynSZUnku7gL9y4ICNn0z82FtDVOUL/VVQG+yP3mzuT/7WO67GJs vv9FfeWUEBffhxnU4zRLtaFzihTk4tfIgqbuwahcv88jPXjnT47zthJJjzfGLfvc0i7j 1XwmGxSOwEar6/EsvQNp97l9PQQ4Nn7tDrYgp6Gl2Gwv+22Gk5O5iz+kwMGpyXlgGzjd dNpHrIwuhTq+PFdO2obeHlQBMJYjVBxM6JxecFfvI8Wgi0B9cD55WFQPRyMsApXImHQG FU0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=9NsUGBo4L3YWfYIGKuqoWfL0ngsVI9vAttPRBlIpgk8=; fh=Y2EDcq1mjcP51HYWjoBdkI49TNTG4450vJZ9qeIi2+c=; b=aXuivvoGlfQFWQAMnInUOGu9Vfs/CyGFl0TVZdAwOik0JPd7KQ2dUH0m4dP4k7rnOW 77b+BFq+lCFfESaJNonWWU8tCHtHB7UFcr1UvBLwEnIWb+2WBNFSTyDnmX/GoOet1E/D ogaDzWtZo7xQ+tQekQYnD9LHf9PsumrR3AjLpal9Ql7QeZK02o1f70dIwyHEyPuDS5Bs laETcuHiS6iV7yDZDBUEGF35BBku+yPCUdQEwWT4fbOgC3hJ67GnnvIjICszYw0sr/V7 wCe0xCvyBvJefWSzUi8e9+Y25eXWufkdWUR6wwcvQjUpt7SEEa1zuy+CsZZsvez6jKcq X81Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-165-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-165-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z128-20020a633386000000b005c1b31e0c53si1834550pgz.680.2023.11.17.04.39.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 04:39:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-165-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-165-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-165-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2323AB20806 for ; Fri, 17 Nov 2023 12:39:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 878D330F8E for ; Fri, 17 Nov 2023 12:39:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CED7DD5F; Fri, 17 Nov 2023 03:24:12 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1r3wx5-000dL3-JK; Fri, 17 Nov 2023 19:24:00 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 17 Nov 2023 19:24:07 +0800 Date: Fri, 17 Nov 2023 19:24:07 +0800 From: Herbert Xu To: Dan Carpenter Cc: Ciunas Bennett , Giovanni Cabiddu , "David S. Miller" , Adam Guerin , Andy Shevchenko , Damian Muszynski , Tom Zanussi , Shashank Gupta , Tero Kristo , qat-linux@intel.com, linux-crypto@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] crypto: qat - prevent underflow in rp2srv_store() Message-ID: References: <3fb31247-5f9c-4dba-a8b7-5d653c6509b6@moroto.mountain> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3fb31247-5f9c-4dba-a8b7-5d653c6509b6@moroto.mountain> On Tue, Oct 31, 2023 at 11:58:32AM +0300, Dan Carpenter wrote: > The "ring" variable has an upper bounds check but nothing checks for > negatives. This code uses kstrtouint() already and it was obviously > intended to be declared as unsigned int. Make it so. > > Fixes: dbc8876dd873 ("crypto: qat - add rp2svc sysfs attribute") > Signed-off-by: Dan Carpenter > --- > drivers/crypto/intel/qat/qat_common/adf_sysfs.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt