diff options
author | Al Viro <[email protected]> | 2011-08-18 20:03:19 +0100 |
---|---|---|
committer | Richard Weinberger <[email protected]> | 2011-11-02 14:14:51 +0100 |
commit | 6582b7f7743da6ce3e3714e9e8b18e0e073d4acd (patch) | |
tree | 649346d2333865ccd4bb4d560ceb50c39139c5c2 /arch/um/sys-x86/bug.c | |
parent | 858ba94499b4f48e9eb0be7cf0092f1ea9460fef (diff) |
um: merge arch/um/sys-{i386,x86_64}
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Diffstat (limited to 'arch/um/sys-x86/bug.c')
-rw-r--r-- | arch/um/sys-x86/bug.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/um/sys-x86/bug.c b/arch/um/sys-x86/bug.c new file mode 100644 index 000000000000..e8034e363d83 --- /dev/null +++ b/arch/um/sys-x86/bug.c @@ -0,0 +1,21 @@ +/* + * 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 relevant 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; +} |