Lines Matching full:bug

3   Generic support for BUG()
7 CONFIG_BUG - emit BUG traps. Nothing happens without this.
10 CONFIG_DEBUG_BUGVERBOSE - emit full file+line information for each BUG
22 2. Implement BUG (and optionally BUG_ON, WARN, WARN_ON)
24 - Implement BUG() to generate a faulting instruction
33 or an actual bug.
36 to the expected BUG trap instruction.
46 #include <linux/bug.h>
54 static inline unsigned long bug_addr(const struct bug_entry *bug) in bug_addr() argument
57 return (unsigned long)&bug->bug_addr_disp + bug->bug_addr_disp; in bug_addr()
59 return bug->bug_addr; in bug_addr()
70 struct bug_entry *bug = NULL; in module_find_bug() local
76 bug = mod->bug_table; in module_find_bug()
77 for (i = 0; i < mod->num_bugs; ++i, ++bug) in module_find_bug()
78 if (bugaddr == bug_addr(bug)) in module_find_bug()
81 bug = NULL; in module_find_bug()
85 return bug; in module_find_bug()
109 * traversals, but since we only traverse on BUG()s, a spinlock in module_bug_finalize()
111 * Thus, this uses RCU to safely manipulate the bug list, since BUG in module_bug_finalize()
130 void bug_get_file_line(struct bug_entry *bug, const char **file, in bug_get_file_line() argument
135 *file = (const char *)&bug->file_disp + bug->file_disp; in bug_get_file_line()
137 *file = bug->file; in bug_get_file_line()
139 *line = bug->line; in bug_get_file_line()
148 struct bug_entry *bug; in find_bug() local
150 for (bug = __start___bug_table; bug < __stop___bug_table; ++bug) in find_bug()
151 if (bugaddr == bug_addr(bug)) in find_bug()
152 return bug; in find_bug()
159 struct bug_entry *bug; in __report_bug() local
166 bug = find_bug(bugaddr); in __report_bug()
167 if (!bug) in __report_bug()
172 bug_get_file_line(bug, &file, &line); in __report_bug()
174 warning = (bug->flags & BUGFLAG_WARNING) != 0; in __report_bug()
175 once = (bug->flags & BUGFLAG_ONCE) != 0; in __report_bug()
176 done = (bug->flags & BUGFLAG_DONE) != 0; in __report_bug()
185 bug->flags |= BUGFLAG_DONE; in __report_bug()
189 * BUG() and WARN_ON() families don't print a custom debug message in __report_bug()
194 if ((bug->flags & BUGFLAG_NO_CUT_HERE) == 0) in __report_bug()
198 /* this is a WARN_ON rather than BUG/BUG_ON */ in __report_bug()
199 __warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs, in __report_bug()
205 pr_crit("kernel BUG at %s:%u!\n", file, line); in __report_bug()
207 pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", in __report_bug()
227 struct bug_entry *bug; in clear_once_table() local
229 for (bug = start; bug < end; bug++) in clear_once_table()
230 bug->flags &= ~BUGFLAG_DONE; in clear_once_table()