x86-64: Improve vsyscall emulation CS and RIP handling
Three fixes here: - Send SIGSEGV if called from compat code or with a funny CS. - Don't BUG on impossible addresses. - Add a missing local_irq_disable. This patch also removes an unused variable. Signed-off-by: Andy Lutomirski <luto@mit.edu> Link: http://lkml.kernel.org/r/6fb2b13ab39b743d1e4f466eef13425854912f7f.1310563276.git.luto@mit.edu Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
5cec93c216
commit
c9712944b2
@@ -31,18 +31,6 @@ extern struct timezone sys_tz;
|
||||
|
||||
extern void map_vsyscall(void);
|
||||
|
||||
/* Emulation */
|
||||
|
||||
static inline bool is_vsyscall_entry(unsigned long addr)
|
||||
{
|
||||
return (addr & ~0xC00UL) == VSYSCALL_START;
|
||||
}
|
||||
|
||||
static inline int vsyscall_entry_nr(unsigned long addr)
|
||||
{
|
||||
return (addr & 0xC00UL) >> 10;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_X86_VSYSCALL_H */
|
||||
|
Reference in New Issue
Block a user