diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vsprintf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index d3023df8477f..d9e01fc3168e 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -574,7 +574,9 @@ char *symbol_string(char *buf, char *end, void *ptr, | |||
574 | unsigned long value = (unsigned long) ptr; | 574 | unsigned long value = (unsigned long) ptr; |
575 | #ifdef CONFIG_KALLSYMS | 575 | #ifdef CONFIG_KALLSYMS |
576 | char sym[KSYM_SYMBOL_LEN]; | 576 | char sym[KSYM_SYMBOL_LEN]; |
577 | if (ext != 'f' && ext != 's') | 577 | if (ext == 'B') |
578 | sprint_backtrace(sym, value); | ||
579 | else if (ext != 'f' && ext != 's') | ||
578 | sprint_symbol(sym, value); | 580 | sprint_symbol(sym, value); |
579 | else | 581 | else |
580 | kallsyms_lookup(value, NULL, NULL, NULL, sym); | 582 | kallsyms_lookup(value, NULL, NULL, NULL, sym); |
@@ -949,6 +951,7 @@ int kptr_restrict = 1; | |||
949 | * - 'f' For simple symbolic function names without offset | 951 | * - 'f' For simple symbolic function names without offset |
950 | * - 'S' For symbolic direct pointers with offset | 952 | * - 'S' For symbolic direct pointers with offset |
951 | * - 's' For symbolic direct pointers without offset | 953 | * - 's' For symbolic direct pointers without offset |
954 | * - 'B' For backtraced symbolic direct pointers with offset | ||
952 | * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref] | 955 | * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref] |
953 | * - 'r' For raw struct resource, e.g., [mem 0x0-0x1f flags 0x201] | 956 | * - 'r' For raw struct resource, e.g., [mem 0x0-0x1f flags 0x201] |
954 | * - 'M' For a 6-byte MAC address, it prints the address in the | 957 | * - 'M' For a 6-byte MAC address, it prints the address in the |
@@ -1008,6 +1011,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
1008 | /* Fallthrough */ | 1011 | /* Fallthrough */ |
1009 | case 'S': | 1012 | case 'S': |
1010 | case 's': | 1013 | case 's': |
1014 | case 'B': | ||
1011 | return symbol_string(buf, end, ptr, spec, *fmt); | 1015 | return symbol_string(buf, end, ptr, spec, *fmt); |
1012 | case 'R': | 1016 | case 'R': |
1013 | case 'r': | 1017 | case 'r': |
@@ -1279,6 +1283,7 @@ qualifier: | |||
1279 | * %ps output the name of a text symbol without offset | 1283 | * %ps output the name of a text symbol without offset |
1280 | * %pF output the name of a function pointer with its offset | 1284 | * %pF output the name of a function pointer with its offset |
1281 | * %pf output the name of a function pointer without its offset | 1285 | * %pf output the name of a function pointer without its offset |
1286 | * %pB output the name of a backtrace symbol with its offset | ||
1282 | * %pR output the address range in a struct resource with decoded flags | 1287 | * %pR output the address range in a struct resource with decoded flags |
1283 | * %pr output the address range in a struct resource with raw flags | 1288 | * %pr output the address range in a struct resource with raw flags |
1284 | * %pM output a 6-byte MAC address with colons | 1289 | * %pM output a 6-byte MAC address with colons |