forked from beagleboard/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] UML: add generic BUG support
The BUG changes in -mm3 need some arch support. This patch adds the UML support needed. For the most part, it was stolen from the underlying architecture. The exception is the kernel eip < PAGE_OFFSET test, which is wrong for skas mode UMLs. Signed-off-by: Jeff Dike <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
6 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (C) 2006 Jeff Dike ([email protected]) | ||
* Licensed under the GPL V2 | ||
*/ | ||
|
||
#include <linux/uaccess.h> | ||
|
||
/* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | ||
* that's not relevent in skas mode. | ||
*/ | ||
|
||
int is_valid_bugaddr(unsigned long eip) | ||
{ | ||
unsigned short ud2; | ||
|
||
if (probe_kernel_address((unsigned short __user *)eip, ud2)) | ||
return 0; | ||
|
||
return ud2 == 0x0b0f; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (C) 2006 Jeff Dike ([email protected]) | ||
* Licensed under the GPL V2 | ||
*/ | ||
|
||
#include <linux/uaccess.h> | ||
|
||
/* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | ||
* that's not relevent in skas mode. | ||
*/ | ||
|
||
int is_valid_bugaddr(unsigned long eip) | ||
{ | ||
unsigned short ud2; | ||
|
||
if (probe_kernel_address((unsigned short __user *)eip, ud2)) | ||
return 0; | ||
|
||
return ud2 == 0x0b0f; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#ifndef __UM_BUG_H | ||
#define __UM_BUG_H | ||
#include <asm-generic/bug.h> | ||
|
||
#include <asm/arch/bug.h> | ||
|
||
#endif |