Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
51ccbb0a
Commit
51ccbb0a
authored
Jan 22, 2018
by
Petr Mladek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-4.16-print-symbol' into for-4.16
parents
3ccdc519
d2279c9d
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
31 additions
and
79 deletions
+31
-79
Documentation/filesystems/sysfs.txt
Documentation/filesystems/sysfs.txt
+2
-2
Documentation/translations/zh_CN/filesystems/sysfs.txt
Documentation/translations/zh_CN/filesystems/sysfs.txt
+2
-2
arch/arm/kernel/process.c
arch/arm/kernel/process.c
+2
-3
arch/arm64/kernel/process.c
arch/arm64/kernel/process.c
+2
-3
arch/c6x/kernel/traps.c
arch/c6x/kernel/traps.c
+1
-3
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+3
-7
arch/mn10300/kernel/traps.c
arch/mn10300/kernel/traps.c
+1
-3
arch/sh/kernel/process_32.c
arch/sh/kernel/process_32.c
+2
-3
arch/unicore32/kernel/process.c
arch/unicore32/kernel/process.c
+2
-3
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mcheck/mce.c
+1
-2
arch/x86/mm/mmio-mod.c
arch/x86/mm/mmio-mod.c
+2
-3
drivers/base/core.c
drivers/base/core.c
+2
-3
fs/sysfs/file.c
fs/sysfs/file.c
+2
-3
include/linux/kallsyms.h
include/linux/kallsyms.h
+0
-18
kernel/irq/debug.h
kernel/irq/debug.h
+6
-8
kernel/kallsyms.c
kernel/kallsyms.c
+0
-11
lib/smp_processor_id.c
lib/smp_processor_id.c
+1
-2
No files found.
Documentation/filesystems/sysfs.txt
View file @
51ccbb0a
...
...
@@ -154,8 +154,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
if (dev_attr->show)
ret = dev_attr->show(dev, dev_attr, buf);
if (ret >= (ssize_t)PAGE_SIZE) {
print
_symbol("dev_attr_show: %s
returned bad count\n",
(unsigned long)
dev_attr->show);
print
k("dev_attr_show: %pS
returned bad count\n",
dev_attr->show);
}
return ret;
}
...
...
Documentation/translations/zh_CN/filesystems/sysfs.txt
View file @
51ccbb0a
...
...
@@ -167,8 +167,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
if (dev_attr->show)
ret = dev_attr->show(dev, dev_attr, buf);
if (ret >= (ssize_t)PAGE_SIZE) {
print
_symbol("dev_attr_show: %s
returned bad count\n",
(unsigned long)
dev_attr->show);
print
k("dev_attr_show: %pS
returned bad count\n",
dev_attr->show);
}
return ret;
}
...
...
arch/arm/kernel/process.c
View file @
51ccbb0a
...
...
@@ -21,7 +21,6 @@
#include <linux/unistd.h>
#include <linux/user.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/elfcore.h>
#include <linux/pm.h>
...
...
@@ -121,8 +120,8 @@ void __show_regs(struct pt_regs *regs)
show_regs_print_info
(
KERN_DEFAULT
);
print
_symbol
(
"PC is at %s
\n
"
,
instruction_pointer
(
regs
));
print
_symbol
(
"LR is at %s
\n
"
,
regs
->
ARM_lr
);
print
k
(
"PC is at %pS
\n
"
,
(
void
*
)
instruction_pointer
(
regs
));
print
k
(
"LR is at %pS
\n
"
,
(
void
*
)
regs
->
ARM_lr
);
printk
(
"pc : [<%08lx>] lr : [<%08lx>] psr: %08lx
\n
"
,
regs
->
ARM_pc
,
regs
->
ARM_lr
,
regs
->
ARM_cpsr
);
printk
(
"sp : %08lx ip : %08lx fp : %08lx
\n
"
,
...
...
arch/arm64/kernel/process.c
View file @
51ccbb0a
...
...
@@ -35,7 +35,6 @@
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
...
...
@@ -221,8 +220,8 @@ void __show_regs(struct pt_regs *regs)
show_regs_print_info
(
KERN_DEFAULT
);
print_pstate
(
regs
);
print
_symbol
(
"pc : %s
\n
"
,
regs
->
pc
);
print
_symbol
(
"lr : %s
\n
"
,
lr
);
print
k
(
"pc : %pS
\n
"
,
(
void
*
)
regs
->
pc
);
print
k
(
"lr : %pS
\n
"
,
(
void
*
)
lr
);
printk
(
"sp : %016llx
\n
"
,
sp
);
i
=
top_reg
;
...
...
arch/c6x/kernel/traps.c
View file @
51ccbb0a
...
...
@@ -11,7 +11,6 @@
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/sched/debug.h>
#include <linux/kallsyms.h>
#include <linux/bug.h>
#include <asm/soc.h>
...
...
@@ -375,8 +374,7 @@ static void show_trace(unsigned long *stack, unsigned long *endstack)
if
(
i
%
5
==
0
)
pr_debug
(
"
\n
"
);
#endif
pr_debug
(
" [<%08lx>]"
,
addr
);
print_symbol
(
" %s
\n
"
,
addr
);
pr_debug
(
" [<%08lx>] %pS
\n
"
,
addr
,
(
void
*
)
addr
);
i
++
;
}
}
...
...
arch/ia64/kernel/process.c
View file @
51ccbb0a
...
...
@@ -13,7 +13,6 @@
#include <linux/pm.h>
#include <linux/elf.h>
#include <linux/errno.h>
#include <linux/kallsyms.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/slab.h>
...
...
@@ -69,7 +68,6 @@ void
ia64_do_show_stack
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
unsigned
long
ip
,
sp
,
bsp
;
char
buf
[
128
];
/* don't make it so big that it overflows the stack! */
printk
(
"
\n
Call Trace:
\n
"
);
do
{
...
...
@@ -79,11 +77,9 @@ ia64_do_show_stack (struct unw_frame_info *info, void *arg)
unw_get_sp
(
info
,
&
sp
);
unw_get_bsp
(
info
,
&
bsp
);
snprintf
(
buf
,
sizeof
(
buf
),
" [<%016lx>] %%s
\n
"
printk
(
" [<%016lx>] %pS
\n
"
" sp=%016lx bsp=%016lx
\n
"
,
ip
,
sp
,
bsp
);
print_symbol
(
buf
,
ip
);
ip
,
(
void
*
)
ip
,
sp
,
bsp
);
}
while
(
unw_unwind
(
info
)
>=
0
);
}
...
...
@@ -111,7 +107,7 @@ show_regs (struct pt_regs *regs)
printk
(
"psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)
\n
"
,
regs
->
cr_ipsr
,
regs
->
cr_ifs
,
ip
,
print_tainted
(),
init_utsname
()
->
release
);
print
_symbol
(
"ip is at %s
\n
"
,
ip
);
print
k
(
"ip is at %pS
\n
"
,
(
void
*
)
ip
);
printk
(
"unat: %016lx pfs : %016lx rsc : %016lx
\n
"
,
regs
->
ar_unat
,
regs
->
ar_pfs
,
regs
->
ar_rsc
);
printk
(
"rnat: %016lx bsps: %016lx pr : %016lx
\n
"
,
...
...
arch/mn10300/kernel/traps.c
View file @
51ccbb0a
...
...
@@ -22,7 +22,6 @@
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/pci.h>
#include <linux/kdebug.h>
#include <linux/bug.h>
...
...
@@ -262,8 +261,7 @@ void show_trace(unsigned long *sp)
raslot
=
ULONG_MAX
;
else
printk
(
" ?"
);
print_symbol
(
" %s"
,
addr
);
printk
(
"
\n
"
);
printk
(
" %pS
\n
"
,
(
void
*
)
addr
);
}
}
...
...
arch/sh/kernel/process_32.c
View file @
51ccbb0a
...
...
@@ -20,7 +20,6 @@
#include <linux/sched/task_stack.h>
#include <linux/slab.h>
#include <linux/elfcore.h>
#include <linux/kallsyms.h>
#include <linux/fs.h>
#include <linux/ftrace.h>
#include <linux/hw_breakpoint.h>
...
...
@@ -37,8 +36,8 @@ void show_regs(struct pt_regs * regs)
printk
(
"
\n
"
);
show_regs_print_info
(
KERN_DEFAULT
);
print
_symbol
(
"PC is at %s
\n
"
,
instruction_pointer
(
regs
));
print
_symbol
(
"PR is at %s
\n
"
,
regs
->
pr
);
print
k
(
"PC is at %pS
\n
"
,
(
void
*
)
instruction_pointer
(
regs
));
print
k
(
"PR is at %pS
\n
"
,
(
void
*
)
regs
->
pr
);
printk
(
"PC : %08lx SP : %08lx SR : %08lx "
,
regs
->
pc
,
regs
->
regs
[
15
],
regs
->
sr
);
...
...
arch/unicore32/kernel/process.c
View file @
51ccbb0a
...
...
@@ -23,7 +23,6 @@
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
...
...
@@ -139,8 +138,8 @@ void __show_regs(struct pt_regs *regs)
char
buf
[
64
];
show_regs_print_info
(
KERN_DEFAULT
);
print
_symbol
(
"PC is at %s
\n
"
,
instruction_pointer
(
regs
));
print
_symbol
(
"LR is at %s
\n
"
,
regs
->
UCreg_lr
);
print
k
(
"PC is at %pS
\n
"
,
(
void
*
)
instruction_pointer
(
regs
));
print
k
(
"LR is at %pS
\n
"
,
(
void
*
)
regs
->
UCreg_lr
);
printk
(
KERN_DEFAULT
"pc : [<%08lx>] lr : [<%08lx>] psr: %08lx
\n
"
"sp : %08lx ip : %08lx fp : %08lx
\n
"
,
regs
->
UCreg_pc
,
regs
->
UCreg_lr
,
regs
->
UCreg_asr
,
...
...
arch/x86/kernel/cpu/mcheck/mce.c
View file @
51ccbb0a
...
...
@@ -14,7 +14,6 @@
#include <linux/capability.h>
#include <linux/miscdevice.h>
#include <linux/ratelimit.h>
#include <linux/kallsyms.h>
#include <linux/rcupdate.h>
#include <linux/kobject.h>
#include <linux/uaccess.h>
...
...
@@ -235,7 +234,7 @@ static void __print_mce(struct mce *m)
m
->
cs
,
m
->
ip
);
if
(
m
->
cs
==
__KERNEL_CS
)
pr
int_symbol
(
"{%s}"
,
m
->
ip
);
pr
_cont
(
"{%pS}"
,
(
void
*
)
m
->
ip
);
pr_cont
(
"
\n
"
);
}
...
...
arch/x86/mm/mmio-mod.c
View file @
51ccbb0a
...
...
@@ -29,7 +29,6 @@
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/kallsyms.h>
#include <asm/pgtable.h>
#include <linux/mmiotrace.h>
#include <asm/e820/api.h>
/* for ISA_START_ADDRESS */
...
...
@@ -123,8 +122,8 @@ static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr)
pr_emerg
(
"unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx
\n
"
,
addr
,
my_reason
->
addr
);
print_pte
(
addr
);
pr
int_symbol
(
KERN_EMERG
"faulting IP is at %s
\n
"
,
regs
->
ip
);
pr
int_symbol
(
KERN_EMERG
"last faulting IP was at %s
\n
"
,
my_reason
->
ip
);
pr
_emerg
(
"faulting IP is at %pS
\n
"
,
(
void
*
)
regs
->
ip
);
pr
_emerg
(
"last faulting IP was at %pS
\n
"
,
(
void
*
)
my_reason
->
ip
);
#ifdef __i386__
pr_emerg
(
"eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx
\n
"
,
regs
->
ax
,
regs
->
bx
,
regs
->
cx
,
regs
->
dx
);
...
...
drivers/base/core.c
View file @
51ccbb0a
...
...
@@ -22,7 +22,6 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/genhd.h>
#include <linux/kallsyms.h>
#include <linux/mutex.h>
#include <linux/pm_runtime.h>
#include <linux/netdevice.h>
...
...
@@ -687,8 +686,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
if
(
dev_attr
->
show
)
ret
=
dev_attr
->
show
(
dev
,
dev_attr
,
buf
);
if
(
ret
>=
(
ssize_t
)
PAGE_SIZE
)
{
print
_symbol
(
"dev_attr_show: %s
returned bad count
\n
"
,
(
unsigned
long
)
dev_attr
->
show
);
print
k
(
"dev_attr_show: %pS
returned bad count
\n
"
,
dev_attr
->
show
);
}
return
ret
;
}
...
...
fs/sysfs/file.c
View file @
51ccbb0a
...
...
@@ -12,7 +12,6 @@
#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/kallsyms.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/mutex.h>
...
...
@@ -70,8 +69,8 @@ static int sysfs_kf_seq_show(struct seq_file *sf, void *v)
* indicate truncated result or overflow in normal use cases.
*/
if
(
count
>=
(
ssize_t
)
PAGE_SIZE
)
{
print
_symbol
(
"fill_read_buffer: %s
returned bad count
\n
"
,
(
unsigned
long
)
ops
->
show
);
print
k
(
"fill_read_buffer: %pS
returned bad count
\n
"
,
ops
->
show
);
/* Try to struggle along */
count
=
PAGE_SIZE
-
1
;
}
...
...
include/linux/kallsyms.h
View file @
51ccbb0a
...
...
@@ -100,9 +100,6 @@ extern int sprint_symbol(char *buffer, unsigned long address);
extern
int
sprint_symbol_no_offset
(
char
*
buffer
,
unsigned
long
address
);
extern
int
sprint_backtrace
(
char
*
buffer
,
unsigned
long
address
);
/* Look up a kernel symbol and print it to the kernel messages. */
extern
void
__print_symbol
(
const
char
*
fmt
,
unsigned
long
address
);
int
lookup_symbol_name
(
unsigned
long
addr
,
char
*
symname
);
int
lookup_symbol_attrs
(
unsigned
long
addr
,
unsigned
long
*
size
,
unsigned
long
*
offset
,
char
*
modname
,
char
*
name
);
...
...
@@ -172,23 +169,8 @@ static inline int kallsyms_show_value(void)
return
false
;
}
/* Stupid that this does nothing, but I didn't create this mess. */
#define __print_symbol(fmt, addr)
#endif
/*CONFIG_KALLSYMS*/
/* This macro allows us to keep printk typechecking */
static
__printf
(
1
,
2
)
void
__check_printsym_format
(
const
char
*
fmt
,
...)
{
}
static
inline
void
print_symbol
(
const
char
*
fmt
,
unsigned
long
addr
)
{
__check_printsym_format
(
fmt
,
""
);
__print_symbol
(
fmt
,
(
unsigned
long
)
__builtin_extract_return_addr
((
void
*
)
addr
));
}
static
inline
void
print_ip_sym
(
unsigned
long
ip
)
{
printk
(
"[<%p>] %pS
\n
"
,
(
void
*
)
ip
,
(
void
*
)
ip
);
...
...
kernel/irq/debug.h
View file @
51ccbb0a
...
...
@@ -3,8 +3,6 @@
* Debugging printout:
*/
#include <linux/kallsyms.h>
#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
/* FIXME */
...
...
@@ -14,14 +12,14 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
{
printk
(
"irq %d, desc: %p, depth: %d, count: %d, unhandled: %d
\n
"
,
irq
,
desc
,
desc
->
depth
,
desc
->
irq_count
,
desc
->
irqs_unhandled
);
printk
(
"->handle_irq(): %p,
"
,
desc
->
handle_irq
);
print_symbol
(
"%s
\n
"
,
(
unsigned
long
)
desc
->
handle_irq
);
printk
(
"->irq_data.chip(): %p,
"
,
desc
->
irq_data
.
chip
);
print_symbol
(
"%s
\n
"
,
(
unsigned
long
)
desc
->
irq_data
.
chip
);
printk
(
"->handle_irq(): %p,
%pS
\n
"
,
desc
->
handle_irq
,
desc
->
handle_irq
);
printk
(
"->irq_data.chip(): %p,
%pS
\n
"
,
desc
->
irq_data
.
chip
,
desc
->
irq_data
.
chip
);
printk
(
"->action(): %p
\n
"
,
desc
->
action
);
if
(
desc
->
action
)
{
printk
(
"->action->handler(): %p,
"
,
desc
->
action
->
handler
);
print_symbol
(
"%s
\n
"
,
(
unsigned
long
)
desc
->
action
->
handler
);
printk
(
"->action->handler(): %p,
%pS
\n
"
,
desc
->
action
->
handler
,
desc
->
action
->
handler
);
}
___P
(
IRQ_LEVEL
);
...
...
kernel/kallsyms.c
View file @
51ccbb0a
...
...
@@ -429,17 +429,6 @@ int sprint_backtrace(char *buffer, unsigned long address)
return
__sprint_symbol
(
buffer
,
address
,
-
1
,
1
);
}
/* Look up a kernel symbol and print it to the kernel messages. */
void
__print_symbol
(
const
char
*
fmt
,
unsigned
long
address
)
{
char
buffer
[
KSYM_SYMBOL_LEN
];
sprint_symbol
(
buffer
,
address
);
printk
(
fmt
,
buffer
);
}
EXPORT_SYMBOL
(
__print_symbol
);
/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
struct
kallsym_iter
{
loff_t
pos
;
...
...
lib/smp_processor_id.c
View file @
51ccbb0a
...
...
@@ -5,7 +5,6 @@
* DEBUG_PREEMPT variant of smp_processor_id().
*/
#include <linux/export.h>
#include <linux/kallsyms.h>
#include <linux/sched.h>
notrace
static
unsigned
int
check_preemption_disabled
(
const
char
*
what1
,
...
...
@@ -43,7 +42,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
printk
(
KERN_ERR
"BUG: using %s%s() in preemptible [%08x] code: %s/%d
\n
"
,
what1
,
what2
,
preempt_count
()
-
1
,
current
->
comm
,
current
->
pid
);
print
_symbol
(
"caller is %s
\n
"
,
(
long
)
__builtin_return_address
(
0
));
print
k
(
"caller is %pS
\n
"
,
__builtin_return_address
(
0
));
dump_stack
();
out_enable:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment