On 04/09, Oleg Nesterov wrote:
>
> For the moment, lets forget about compat tasks on a 64-bit kernel, can't
> we simply do something like below?

...

> --- a/arch/x86/kernel/uprobes.c
> +++ b/arch/x86/kernel/uprobes.c
> @@ -840,12 +840,16 @@ static int branch_setup_xol_ops(struct arch_uprobe 
> *auprobe, struct insn *insn)
>       insn_byte_t p;
>       int i;
>  
> +     /* prefix* + nop[i]; same as jmp with .offs = 0 */
> +     for (i = 1; i <= ASM_NOP_MAX; ++i) {
> +             if (!memcmp(insn->kaddr, x86_nops[i], i))
> +                     goto setup;
> +     }
> +
>       switch (opc1) {
>       case 0xeb:      /* jmp 8 */
>       case 0xe9:      /* jmp 32 */
>               break;
> -     case 0x90:      /* prefix* + nop; same as jmp with .offs = 0 */
> -             goto setup;

OK, I guess we can't remove this "case 0x90" because of prefixes, please
ignore this part.

Oleg.


Reply via email to