From nobody Wed Oct 1 22:30:48 2025 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 9368530AAC2 for ; Tue, 30 Sep 2025 17:01:26 +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=1759251686; cv=none; b=Fu1R4jWjQzhAxIf9iB4IcSXYlVfFaoMu+5RbwPhOXGkb1/63iPoufKMfYCYxYKJYpnGOYwW9QigoAuskLkvI+Uae7eoQDNEjQUb6BI1twKKERpPb7N6rggDIj8gsZKpYWXIDfWVjeje4DX/QZJYOAmeYHq3C05MbjQuJl+M9RZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759251686; c=relaxed/simple; bh=yHsMTGqvohOFfGloUw1p3CtiQgsrh/OUcTuurZP/zf0=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=b9+OwRVGWnpLqWVdD6w6Up+LJqoFhU/Orhmv/Qpz886AGzk0wKzoB+j9WhWRBCoAVGFXeIErUpChpd375+n6MfYn2JUsVHvNS70tLddoamj7IxC5g2DS8uE2DMhF8bV1iFmoOHM7orqGl1Vz378wFmQPOQSuabeeq9lc34Nt664= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CYttMf2f; 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="CYttMf2f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FC6EC113D0; Tue, 30 Sep 2025 17:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759251686; bh=yHsMTGqvohOFfGloUw1p3CtiQgsrh/OUcTuurZP/zf0=; h=Date:From:To:Cc:Subject:References:From; b=CYttMf2fTXDaIU4UB4/TrCKYjnT1zDUvl7QeKBPLPocnar8blRJ2sFK7Ryaxy80x/ hgoN/UPuujXSts2Wtn/pg/imbhuN9kssEJnbdC66msRvhxhMXFWvBsBJ1iQxoyOnM1 d97jsF9tfylDXBc5Y2oCcIH+fCc/UFVUkD6T4bIZRNFih/KRep3UbmYRqWuBjZ+5k7 nfd8mmMx/1OJU0JbSpYHXMfBmyGWG3N7c9sy6ijz4NZUfJ/YkIWmtPa0zpbhu2M7Gk mNe159f1+eMSCMDjPkas7WiQBWMIo7m+VW480o0wYBps2N0ylAAS/Vcrc3GM0DYXvf eDs6Ps9y+mL/Q== Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1v3dkk-0000000DIHo-0mOL; Tue, 30 Sep 2025 13:03:02 -0400 Message-ID: <20250930170302.037046621@kernel.org> User-Agent: quilt/0.68 Date: Tue, 30 Sep 2025 13:01:40 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Elijah Wright Subject: [for-next][PATCH 05/11] tracing: Move buffer in trace_seq to end of struct References: <20250930170135.285740909@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Elijah Wright TRACE_SEQ_BUFFER_SIZE is dependent on the architecture for its size. on 64-= bit systems, it is 8148 bytes. forced 8-byte alignment in size_t and seq_buf me= ans that trace_seq is 8200 bytes on 64-bit systems. moving the buffer to the end of the struct fixes the issue. there shouldn't be any side effects, i.e. pointer arithmetic on trace_seq Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250821053917.23301-1-git@elijahs.space Signed-off-by: Elijah Wright Signed-off-by: Steven Rostedt (Google) --- include/linux/trace_seq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index a93ed5ac3226..557780fe1c77 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h @@ -21,10 +21,10 @@ (sizeof(struct seq_buf) + sizeof(size_t) + sizeof(int))) =20 struct trace_seq { - char buffer[TRACE_SEQ_BUFFER_SIZE]; struct seq_buf seq; size_t readpos; int full; + char buffer[TRACE_SEQ_BUFFER_SIZE]; }; =20 static inline void --=20 2.50.1