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 808832572; Wed, 18 Dec 2024 00:47:47 +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=1734482867; cv=none; b=MbDsC+qQzt2kU6EOotWzcSLRCji3uS2VAaVoDnT3hZY4nzrgs/2YKCz1/bVxLus24sO1tBx3+r7bLxDRiK93qxLHIsb3wEvXkZDQCv87KdeSDcrM8ayRowE7zuMYw80uPRmAJnvsJqyR6hTNXPMRalk7Hgd1AWy1ZT+LADDqnxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482867; c=relaxed/simple; bh=xqNAI8+AELjGQ5jruNEEsTFLc+OTvmmjJkh0Cc4jLdg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YKM9bo1Yj1w/v7EQ428bDhEeywe4J40f25UXwVYgQb4WHv+6J9tWQRvn815Zr7arsa0GT6vsvuEksoPfYa4xwcxbnJKTVsr/3yDE3BkhqqzlGLRcQirOavjbXBKiOBesO7oLfvosLIXjoGoulm1qancv9qMvxJbgCO2YbNuCsGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07566C4CED3; Wed, 18 Dec 2024 00:47:45 +0000 (UTC) Date: Tue, 17 Dec 2024 19:48:22 -0500 From: Steven Rostedt To: Linus Torvalds Cc: Alexei Starovoitov , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , stable@vger.kernel.org Subject: Re: [PATCH 1/3] ring-buffer: Add uname to match criteria for persistent ring buffer Message-ID: <20241217194822.4fb1d81a@gandalf.local.home> In-Reply-To: References: <20241217173237.836878448@goodmis.org> <20241217173520.314190793@goodmis.org> <20241217130454.5bb593e8@gandalf.local.home> <20241217133318.06f849c9@gandalf.local.home> <20241217140153.22ac28b0@gandalf.local.home> <20241217144411.2165f73b@gandalf.local.home> <20241217175301.03d25799@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-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, 17 Dec 2024 16:02:34 -0800 Linus Torvalds wrote: > On Tue, 17 Dec 2024 at 15:32, Linus Torvalds > wrote: > > > > But if you look more closely, you'll see that the way the buffer is > > managed is actually not as a word array at all, but using > > > > char *str, *end; > > > > instead of word pointers. > > Oh, and in addition to the smaller-than-int types ('%c' and '%hd' > etc), pointers that get dereferenced also get written as a byte string > to that word array. There might be other cases too. > > So it's really a fairly odd kind of "sometimes words, sometimes not" > array, with the size of the array given in words. > > That binary printf is very strange. Note that at least on the tracing user space side, as trace_printk() is never used in production systems and mostly just used for debugging, we can be pretty liberal if I have to change libtraceevent. I could even add an update to the format file to have the library stay backward compatible with older kernels and can see that the format file has been updated to know that the vbin_printf() has changed. -- Steve