lkml.org 
[lkml]   [2021]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/3] lib/vsprintf.c: make %pD print full path for file
On (21/05/08 20:25), Jia He wrote:
> +++ b/lib/vsprintf.c
> @@ -27,6 +27,7 @@
> #include <linux/string.h>
> #include <linux/ctype.h>
> #include <linux/kernel.h>
> +#include <linux/dcache.h>
> #include <linux/kallsyms.h>
> #include <linux/math64.h>
> #include <linux/uaccess.h>
> @@ -923,10 +924,17 @@ static noinline_for_stack
> char *file_dentry_name(char *buf, char *end, const struct file *f,
> struct printf_spec spec, const char *fmt)
> {
> + const struct path *path = &f->f_path;
> + char *p;
> + char tmp[128];

This doesn't look ideal. Why 128 bytes and why on the stack?

\
 
 \ /
  Last update: 2021-05-10 05:47    [W:0.400 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site