Subject: Re: [PATCH][v3] uprobes/x86: emulate push insns for uprobe on x86

From: Oleg Nesterov <[email-masked]>
Date: Wed, 15 Nov 2017 16:47:07 +0100

On 11/14, Yonghong Song wrote:
>
>
> On 11/14/17 8:03 AM, Oleg Nesterov wrote:
> >Ah, no, sizeof_long() is broken by the same reason, so you can't test it...
>
> Right. I hacked the emulate_push_stack (original name: push_ret_address)
> with sizeof_long = 4, and 32bit binary uprobe works fine on x86_64 platform
> then...

OK,

> >OK, I'll try to do something tomorrow, then we will see what can we do
> >with your patch...
>
> Thanks for reviewing! I will wait for your further comments/direction
> before next step.

Oh. tomorrow, I promise. Sorry I was bit busy today...

> >
> >But it would be nice if you can check what uprobe_init_insn() does in this
> >case, see above.
>
> As mentioned in my previous email, for 32bit application,
> compiler won't generate "push %r8" as "%r8" is only available on
> x86_64 platform.

But this is irrelevant, see my previous email.

So please, check if uprobe_init_insn() fails or not in this case. After that
we will know whether your patch needs the additional is_64bit_mm() check in
push_setup_xol_ops() or not.

Oleg.