From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b4-smtp.messagingengine.com (fout-b4-smtp.messagingengine.com [202.12.124.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98E3B3385A7; Fri, 28 Aug 2026 06:33:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787898809; cv=none; b=KY7hVFF16JSxNeWQs+Y3lvu0i/g33+uWTnl1tOSB6bopu/cW3nCeRV6GtH4izHc8C8Q5ZZB5Fh1jYrRikSkwxRWiv5aw3C2T0f+MVff42CxrG0gxwiGNHuLGu6Gcr1Iv0wyldpXZg5XTXz8QH65nICWPtPfcSQj/Sro9Wwpyn+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787898809; c=relaxed/simple; bh=HZQcu4aZ8tTxFfRNjQw0G/6Q2BP49d5qaYhZXQFGLlg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nyii2bTL1k/kxBSyinyIzZK4kDAg/3wWctwgWbooJ29Zz9GHfXlBVOH1uUnmYDZ90fKuQsP7OWieO88A6udeuJp91BOdYTkpp31z2XDIFvz1bYzzHD9XVT+RFWqzqie17olNV7Y3v3u/EgUnY6hO/nxE+KUhs9cb/xRqxDU82lk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=GdFz8X0M; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=g7Iih7PK; arc=none smtp.client-ip=202.12.124.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="GdFz8X0M"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="g7Iih7PK" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 6C4A11D00084; Fri, 28 Aug 2026 02:33:26 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Fri, 28 Aug 2026 02:33:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1787898806; x=1787985206; bh=1TqSf34J+R Q18DtwXjAHDC4SqrdULRczMIhIFP3i3+w=; b=GdFz8X0MY9cmkbgl6QfrCC4VS9 rKjVtsXJZ5epg+LMH5OWXNnzGGDf9p8G3HHL1DICmeJlKKWXyKl5ykoLdcAGjVYV 3a/yls5UFkiua6wX3w0ZpP+7d/wYFNBSGtKliTAncauLT38SMnJjURESqQn/ujGg myVXTrumdHNSvbbIWT5Fg9Ul7Yi71Bi1ZLV/c/UoyzaalywZSbOQMsRdv/8xkxEc 6CPXqew827WiJLF7GbcFazCq/Pl8t2WCYrtFDjKC7clG+XUpaVzcwmqYWTOBNaFd fxCz3PQlxvtbo+yliZ0uKs4AG8b4itBxZ2zXLFwzzbzVHt8uHvGCFkyMYI/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1787898806; x=1787985206; bh=1Tq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MIiYLJe8CWykNnOZ21xqDiJ7khzQtZidl4UVMOPX7QbZ2w X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Aug 2026 02:33:25 -0400 (EDT) Date: Fri, 28 Aug 2026 08:33:24 +0200 From: Greg KH To: MoGGuU Cc: Tomeu Vizoso , Oded Gabbay , Jeff Hugo , Sidong Yang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v4 1/3] accel/rocket: Validate BO handle counts on job submission Message-ID: <2026082816-regular-doze-e442@gregkh> References: <20260828061916.20405-1-Naixumogu@whut.edu.cn> <20260828061916.20405-2-Naixumogu@whut.edu.cn> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260828061916.20405-2-Naixumogu@whut.edu.cn> On Fri, Aug 28, 2026 at 02:19:14PM +0800, MoGGuU wrote: > The input and output BO handle counts are __u32, while GEM lookup and > reservation helpers take int counts. A count above INT_MAX cannot be > represented safely by the GEM lookup helper. > > Reject each count above INT_MAX before looking up the BOs. > > rocket_job_push() already uses check_add_overflow() for the combined count, > but stores the result in u32, so it only detects unsigned wraparound. Store > the result in int so sums above INT_MAX are rejected before the count is > passed to the reservation helpers. > > Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL") > Cc: stable@vger.kernel.org > Tested-by: Sidong Yang > Reviewed-by: Sidong Yang > Signed-off-by: MoGGuU Real name please. thanks, greg k-h