From 392e8802486cb573b916e746010e141a75f507e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 09:58:27 +0800 Subject: init android origin source code --- ANDROID_3.4.5/arch/x86/um/bug.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ANDROID_3.4.5/arch/x86/um/bug.c (limited to 'ANDROID_3.4.5/arch/x86/um/bug.c') diff --git a/ANDROID_3.4.5/arch/x86/um/bug.c b/ANDROID_3.4.5/arch/x86/um/bug.c new file mode 100644 index 00000000..e8034e36 --- /dev/null +++ b/ANDROID_3.4.5/arch/x86/um/bug.c @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL V2 + */ + +#include + +/* + * 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; +} -- cgit