[lkml]   [2002]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] (re-xmit): kprobes for i386
> > Something like this:
> > ENTRY(debug)
> > testl $0x3, 4(%esp)
> > jz handle_kernel_mode_debug
> >
> This check is insufficient, it can go the wrong way if the interrupted
> taks is in vm 86 mode (and open a big security hole, I believe).
This test from ret_from_intr could be used instead:

push %es
push %ds
push %eax
movl 8(%esp), %eax
movb 4(%esp), %al
testl $(VM_MASK | 3), %eax
jz handle_kernel_mode

There is however a potential register stall for the eax read after the
al write.

BTW, vm86 has the VM flag set so the comment in ret_from_intr is wrong.
The code seems to be right though.

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 13:28    [W:0.118 / U:2.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site