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()
69 struct bug_entry *bug; 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()
79 return bug; in module_find_bug()
105 * traversals, but since we only traverse on BUG()s, a spinlock in module_bug_finalize()
107 * Thus, this uses RCU to safely manipulate the bug list, since BUG in module_bug_finalize()
126 void bug_get_file_line(struct bug_entry *bug, const char **file, in bug_get_file_line() argument
131 *file = (const char *)&bug->file_disp + bug->file_disp; in bug_get_file_line()
133 *file = bug->file; in bug_get_file_line()
135 *line = bug->line; in bug_get_file_line()
144 struct bug_entry *bug; in find_bug() local
146 for (bug = __start___bug_table; bug < __stop___bug_table; ++bug) in find_bug()
147 if (bugaddr == bug_addr(bug)) in find_bug()
148 return bug; in find_bug()
155 struct bug_entry *bug; in __report_bug() local
162 bug = find_bug(bugaddr); in __report_bug()
163 if (!bug) in __report_bug()
168 bug_get_file_line(bug, &file, &line); in __report_bug()
170 warning = (bug->flags & BUGFLAG_WARNING) != 0; in __report_bug()
171 once = (bug->flags & BUGFLAG_ONCE) != 0; in __report_bug()
172 done = (bug->flags & BUGFLAG_DONE) != 0; in __report_bug()
181 bug->flags |= BUGFLAG_DONE; in __report_bug()
185 * BUG() and WARN_ON() families don't print a custom debug message in __report_bug()
190 if ((bug->flags & BUGFLAG_NO_CUT_HERE) == 0) in __report_bug()
194 /* this is a WARN_ON rather than BUG/BUG_ON */ in __report_bug()
195 __warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs, in __report_bug()
201 pr_crit("kernel BUG at %s:%u!\n", file, line); in __report_bug()
203 pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", in __report_bug()
223 struct bug_entry *bug; in clear_once_table() local
225 for (bug = start; bug < end; bug++) in clear_once_table()
226 bug->flags &= ~BUGFLAG_DONE; in clear_once_table()