lkml.org 
[lkml]   [2012]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uprobes/core: handle breakpoint and signal step exception.

* Srikar Dronamraju <srikar@linux.vnet.ibm.com> wrote:

> @@ -233,9 +233,11 @@ static inline void __user *arch_compat_alloc_user_space(long len)
>
> if (test_thread_flag(TIF_IA32)) {
> sp = task_pt_regs(current)->sp;
> +#ifdef CONFIG_X86_64
> } else {
> /* -128 for the x32 ABI redzone */
> sp = __this_cpu_read(old_rsp) - 128;
> +#endif
> }
>
> return (void __user *)round_down(sp - len, 16);

So 'sp' is undefined if that TIF check fails?

Also, on a 32-bit kernel the TIF check probably fails all the
time, because we don't set TIF_IA32 (and don't know that flag).

It would probably be better to make the whole helper inline
#ifdef 64-bit, it does not look very useful on 32-bit.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-03-08 14:51    [from the cache]
©2003-2011 Jasper Spaans