Re: [PATCH] printk: Increase PRINTK_PREFIX_MAX and the buf size in print_caller.

From: gxxa03070307@xxxxxxxxx
Date: Mon Jun 03 2024 - 09:15:53 EST


https://android.googlesource.com/kernel/common/+/refs/heads/android15-6.6/kernel/printk/printk.c

We are based on google source code development, this is the link to google source code printk.c, which adds trace_android_vh_printk_caller, if we want to change the buf size must first merge into linux main line.



gxxa03070307@xxxxxxxxx
邮箱:gxxa03070307@xxxxxxxxx



---- Replied Message ----
From Petr Mladek<pmladek@xxxxxxxx>
Date 06/03/2024 20:42
To gxxa03070307@xxxxxxxxx
Cc john.ogness<john.ogness@xxxxxxxxxxxxx>rostedt<rostedt@xxxxxxxxxxx>senozhatsky<senozhatsky@xxxxxxxxxxxx>linux-kernel<linux-kernel@xxxxxxxxxxxxxxx>fengqi<fengqi@xxxxxxxxxx>高翔<gaoxiang19870307@xxxxxxx>
Subject Re: [PATCH] printk: Increase PRINTK_PREFIX_MAX and the buf size in print_caller.
On Mon 2024-06-03 16:47:01, gxxa03070307@xxxxxxxxx wrote:
> I need to populate the temporary variable "caller" in "print_caller" func with the additional information. And it's no use defining a buf in out-of-tree patch.
> In out-of-tree patch, I can only add hooks (special cases), I can't change anything else, because it needs to be consistent with mainline linux.
> caller buf in mainline linux is it better to make the buf bigger and leave some space?

I do not understand. Why the buffer size has to be consistent with
mainline linux?

Really, it does not make much sense to upstream just this part
of your out-of-tree patch?

Best Regards,
Petr

Attachment: Screenshot_2024-06-03-21-02-27-142_com.android.browser-edit.jpg
Description: JPEG image