Re: [PATCH] printk: Increase PRINTK_PREFIX_MAX and the buf size in print_caller.
From: Petr Mladek
Date: Mon Jun 03 2024 - 11:00:10 EST
On Mon 2024-06-03 21:15:13, gxxa03070307@xxxxxxxxx wrote:
> 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.
trace_android_vh_printk_caller() is not in the mainline
=> there is no reason to change the buffer size in the mainline.
You might try to get the change of the buffer size into the android
google sources.
If you want an upstream support then please try to upstream
the entire solution.
But the use of trace_android_vh_printk_caller() is a hack. And upstream
will not support such hacks.
Best Regards,
Petr
> 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