lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141114071559.GC12682@linux.vnet.ibm.com>
Date:	Fri, 14 Nov 2014 12:45:59 +0530
From:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Tony Luck <tony.luck@...el.com>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH v2 2/2] uprobes, x86: Fix _TIF_UPROBE vs
 _TIF_NOTIFY_RESUME

* Andy Lutomirski <luto@...capital.net> [2014-11-13 23:01:12]:

> On Thu, Nov 13, 2014 at 10:08 PM, Srikar Dronamraju
> <srikar@...ux.vnet.ibm.com> wrote:
> > * Andy Lutomirski <luto@...capital.net> [2014-11-13 14:31:21]:
> >
> >> x86 call do_notify_resume on paranoid returns if TIF_UPROBE is set
> >> but not on non-paranoid returns.  I suspect that this is a mistake
> >> and that the code only works because int3 is paranoid.
> >>
> >> Setting _TIF_NOTIFY_RESUME in the uprobe code was probably a
> >> workaround for the x86 bug.  With that bug fixed, we can remove
> >
> >> _TIF_NOTIFY_RESUME from the uprobes code.
> >>
> >> Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> >> Reported-by: Oleg Nesterov <oleg@...hat.com>
> >> Signed-off-by: Andy Lutomirski <luto@...capital.net>
> >> ---
> >>  arch/x86/include/asm/thread_info.h | 2 +-
> >>  kernel/events/uprobes.c            | 1 -
> >>  2 files changed, 1 insertion(+), 2 deletions(-)
> >>
> >> diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
> >> index 854053889d4d..547e344a6dc6 100644
> >> --- a/arch/x86/include/asm/thread_info.h
> >> +++ b/arch/x86/include/asm/thread_info.h
> >> @@ -141,7 +141,7 @@ struct thread_info {
> >>  /* Only used for 64 bit */
> >>  #define _TIF_DO_NOTIFY_MASK                                          \
> >>       (_TIF_SIGPENDING | _TIF_MCE_NOTIFY | _TIF_NOTIFY_RESUME |       \
> >> -      _TIF_USER_RETURN_NOTIFY)
> >> +      _TIF_USER_RETURN_NOTIFY | _TIF_UPROBE)
> >
> >
> > The comment above says only for 64 bit. So would this still work for
> > i386?
> >
> 
> i386 seems to look at _TIF_WORK_MASK (which includes _TIF_UPROBE) for
> everything except syscalls and at _TIF_WORK_SYSCALL_EXIT for syscall
> return (which does not include _TIF_UPROBE).  Is that okay?
> 

Ok.. That expains (please add my ack to your v3)

Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>

> --Andy
> 
> >>
> >>  /* flags to check in __switch_to() */
> >>  #define _TIF_WORK_CTXSW                                                      \
> >> diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
> >> index 1d0af8a2c646..ed8f2cde34c5 100644
> >> --- a/kernel/events/uprobes.c
> >> +++ b/kernel/events/uprobes.c
> >> @@ -1640,7 +1640,6 @@ bool uprobe_deny_signal(void)
> >>               if (__fatal_signal_pending(t) || arch_uprobe_xol_was_trapped(t)) {
> >>                       utask->state = UTASK_SSTEP_TRAPPED;
> >>                       set_tsk_thread_flag(t, TIF_UPROBE);
> >> -                     set_tsk_thread_flag(t, TIF_NOTIFY_RESUME);
> >>               }
> >>       }
> >>
> >> --
> >> 1.9.3
> >>
> >
> > --
> > Thanks and Regards
> > Srikar Dronamraju
> >
> 
> 
> 
> -- 
> Andy Lutomirski
> AMA Capital Management, LLC
> 

-- 
Thanks and Regards
Srikar Dronamraju

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ