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
nexedi
linux
Commits
841c7879
Commit
841c7879
authored
May 17, 2003
by
Pete Zaitcev
Committed by
David S. Miller
May 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Sanitize BUG().
parent
6befb79d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
16 deletions
+30
-16
arch/sparc/Kconfig
arch/sparc/Kconfig
+7
-0
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sparc_ksyms.c
+5
-0
arch/sparc/kernel/traps.c
arch/sparc/kernel/traps.c
+8
-0
include/asm-sparc/bug.h
include/asm-sparc/bug.h
+10
-16
No files found.
arch/sparc/Kconfig
View file @
841c7879
...
...
@@ -1000,6 +1000,13 @@ config DEBUG_SPINLOCK_SLEEP
If you say Y here, various routines which may sleep will become very
noisy if they are called with a spinlock held.
config DEBUG_BUGVERBOSE
bool "Verbose BUG() reporting (adds 70K)"
help
Say Y here to make BUG() panics output the file name and line number
of the BUG call as well as the EIP and oops trace. This aids
debugging but costs about 70-100K of memory.
endmenu
source "security/Kconfig"
...
...
arch/sparc/kernel/sparc_ksyms.c
View file @
841c7879
...
...
@@ -53,6 +53,7 @@
#endif
#include <asm/a.out.h>
#include <asm/io-unit.h>
#include <asm/bug.h>
extern
spinlock_t
rtc_lock
;
...
...
@@ -312,5 +313,9 @@ EXPORT_SYMBOL_DOT(umul);
EXPORT_SYMBOL_DOT
(
div
);
EXPORT_SYMBOL_DOT
(
udiv
);
#ifdef CONFIG_DEBUG_BUGVERBOSE
EXPORT_SYMBOL
(
do_BUG
);
#endif
/* Sun Power Management Idle Handler */
EXPORT_SYMBOL
(
pm_idle
);
arch/sparc/kernel/traps.c
View file @
841c7879
...
...
@@ -463,6 +463,14 @@ void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, unsigned long npc
send_sig_info
(
SIGFPE
,
&
info
,
current
);
}
#ifdef CONFIG_DEBUG_BUGVERBOSE
void
do_BUG
(
const
char
*
file
,
int
line
)
{
// bust_spinlocks(1); XXX Not in our original BUG()
printk
(
"kernel BUG at %s:%d!
\n
"
,
file
,
line
);
}
#endif
/* Since we have our mappings set up, on multiprocessors we can spin them
* up here so that timer interrupts work during initialization.
*/
...
...
include/asm-sparc/bug.h
View file @
841c7879
...
...
@@ -2,24 +2,18 @@
#ifndef _SPARC_BUG_H
#define _SPARC_BUG_H
/*
* XXX I am hitting compiler bugs with __builtin_trap. This has
* hit me before and rusty was blaming his netfilter bugs on
* this so lets disable it. - Anton
*/
#if 0
/* We need the mb()'s so we don't trigger a compiler bug - Anton */
#ifdef CONFIG_DEBUG_BUGVERBOSE
extern
void
do_BUG
(
const
char
*
file
,
int
line
);
#define BUG() do { \
mb();
\
do_BUG(__FILE__, __LINE__);
\
__builtin_trap(); \
mb(); \
} while(0)
#else
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; \
} while (0)
#else
#define BUG() __builtin_trap()
#endif
#define PAGE_BUG(page) BUG()
#define PAGE_BUG(page) do { \
BUG(); \
} while (0)
#endif
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