From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 67D80F4F1 for ; Wed, 25 Mar 2026 05:41:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774417315; cv=none; b=Y3SQnwVMV5BLv7YckmiUvb2AeyDHc850YhS9RLslFfUQIzEEfADE4EL1FNXeeT1vTq74e4jQswxZ8L0ktRE34L8rUO963XDs8A7Bq6URRCjd+QQLukMOT01pzo3BEnEn237ZtkL9yA49AoDSf9IK+u4kUsY0Q+UwMRaJLiQk4+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774417315; c=relaxed/simple; bh=Ts8Tl4la7xZrUBL0dlMDiBr0+Nhd4FVHnBowfuUzxVQ=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=QFJdi3Sd0ZSBFU5oU/PSnspDYu+1BpVgEdtXrXTpobzUCSzVUH8xifd2JcETZvoZfsPV//ipo8+yI4OfqGXtpyG2ZeKi0AEL+KEE9iXBCWnn5DuarctOEmh8ZyIjgRUIT8u+7UqoTycdaR87d2ZnFuF6TrclCD12W/Gc+HFENZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rNdj+Q5U; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rNdj+Q5U" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4ACDC4CEF7; Wed, 25 Mar 2026 05:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774417315; bh=Ts8Tl4la7xZrUBL0dlMDiBr0+Nhd4FVHnBowfuUzxVQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rNdj+Q5UVFaTShBljMzJWuNUeng2pMAShIyICy8/Ig9qiIO+hQJhG6wIKH5zLtL87 Yf79A1oaWicCWZtLqO5qL2KETHfM/UrX7VhxuUJbf4/U9xc7J8t4cdH40uy4YU14la UzlYnqjafdEgdY+8ab9sMy6J1gmDKg9rhSgtLgbg56x9Y1jBWDmkcD+iITMS7tbIXC Hqj1PQNcuc9CY8pJ6VibNoISW7xsrA50xoRlyKFgxk2aUZ8LR7TPQON7WsXZKFP3mz QUknyHyPSmY/U5vK+k6qubX/n3RiX345lrgNljCyIsgFJYnAXzi/P6UUOjfUnh0yxO zfwbyjLFlWJjw== Date: Wed, 25 Mar 2026 14:41:52 +0900 From: Masami Hiramatsu (Google) To: Andrew Morton Cc: Petr Mladek , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , David Laight , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/2] lib/vsprintf: Fixes size check Message-Id: <20260325144152.78ef46356dc09dee9f315086@kernel.org> In-Reply-To: <20260324220458.3ca2bfeb393eedb5cc7ff52d@linux-foundation.org> References: <177440550682.147866.1854734911195480940.stgit@devnote2> <20260324220458.3ca2bfeb393eedb5cc7ff52d@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Tue, 24 Mar 2026 22:04:58 -0700 Andrew Morton wrote: > On Wed, 25 Mar 2026 11:25:06 +0900 "Masami Hiramatsu (Google)" wrote: > > > Here is the 4th version of patches to fix vsnprintf(). > > > > - Fix to limit the size of width and precision. > > - Warn if the return size is over INT_MAX. > > > > Previous version is here; > > > > https://lore.kernel.org/all/177410406326.38798.16853803119128725972.stgit@devnote2/ > > > > In this version, do clamp() the width and precision before checking it and > > accept negative precision[1/3] and add Petr's Reviewed-by[2/2]. > > AI review has flagged a couple of possible issues: > https://sashiko.dev/#/patchset/177440550682.147866.1854734911195480940.stgit@devnote2 OK, I think I should decouple accept negative precision part from [1/2] since it is changing the kernel specific behavior. Thanks, -- Masami Hiramatsu (Google)