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 D02F22E3B06; Tue, 17 Jun 2025 15:28:27 +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=1750174107; cv=none; b=F1eXPXO87pc/J8ida4GGo0ct3o9WCm20hzIjWo0QfNrkyt0i2chHhe5vx0pFXNtlMUCqU2fXiCqd6PJgzwq6Qr25UD3kCo5Cj11LAVIFIFEmd7/w7YMmoC1kpjZJQ+eeIMZnXkBIWw2a4hwPW7Y6I69uURDtQsMD8CoVjDlEdBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750174107; c=relaxed/simple; bh=iY5aj+maLzqR3R0NWr79UVC8CUHUAmFBFpD6UqTxSgk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xd7IrHwqR75UgxOxB0JMPWZRf0S2Bck5KDdmnOVZwCAk686XiFqg+aDFMsFrO9mdSA7d0vyqURJ6r+eR0UNufid0VGyD4XmHJcwGmHVv2wHNBvydHSUNLH70IRED6yUYRqhBasoSL1QjDfB0wclBJfjIIGQPQ/LYhOhgstSh79Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mUHOb8Wl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mUHOb8Wl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E31C8C4CEE3; Tue, 17 Jun 2025 15:28:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750174107; bh=iY5aj+maLzqR3R0NWr79UVC8CUHUAmFBFpD6UqTxSgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mUHOb8WlS0b+9ddghrreAlWdVAsty5rap3n+ldqt8IRwIfYMOPYJNm9GhGAKImt20 lDr/3V7L+yKj/tCYTO6D3UN3oQNYubJXBzHce27gcah8G817+3EAjB2JX2Szbvj63L 7ARAxRFxpxrCcN3hst5O0lPlM/SYto+SeyuB+3bw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jeongjun Park , Pan Taixi , "Steven Rostedt (Google)" Subject: [PATCH 6.6 001/356] tracing: Fix compilation warning on arm32 Date: Tue, 17 Jun 2025 17:21:56 +0200 Message-ID: <20250617152338.280970833@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152338.212798615@linuxfoundation.org> References: <20250617152338.212798615@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pan Taixi commit 2fbdb6d8e03b70668c0876e635506540ae92ab05 upstream. On arm32, size_t is defined to be unsigned int, while PAGE_SIZE is unsigned long. This hence triggers a compilation warning as min() asserts the type of two operands to be equal. Casting PAGE_SIZE to size_t solves this issue and works on other target architectures as well. Compilation warning details: kernel/trace/trace.c: In function 'tracing_splice_read_pipe': ./include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ ./include/linux/minmax.h:26:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~ ... kernel/trace/trace.c:6771:8: note: in expansion of macro 'min' min((size_t)trace_seq_used(&iter->seq), ^~~ Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250526013731.1198030-1-pantaixi@huaweicloud.com Fixes: f5178c41bb43 ("tracing: Fix oob write in trace_seq_to_buffer()") Reviewed-by: Jeongjun Park Signed-off-by: Pan Taixi Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7023,7 +7023,7 @@ static ssize_t tracing_splice_read_pipe( ret = trace_seq_to_buffer(&iter->seq, page_address(spd.pages[i]), min((size_t)trace_seq_used(&iter->seq), - PAGE_SIZE)); + (size_t)PAGE_SIZE)); if (ret < 0) { __free_page(spd.pages[i]); break;