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