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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120802165452.GB4268@linux.vnet.ibm.com>
Date:	Thu, 2 Aug 2012 22:24:52 +0530
From:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Anton Arapov <anton@...hat.com>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	William Cohen <wcohen@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap

* Oleg Nesterov <oleg@...hat.com> [2012-08-02 16:17:57]:

> Forgot to mention...
> 
> On 08/02, Srikar Dronamraju wrote:
> >
> > While at it, add a missing put_uprobe() in the path where uprobe_mmap()
> > races with uprobe_unregister().
> > ...
> > @@ -1051,8 +1051,10 @@ int uprobe_mmap(struct vm_area_struct *vma)
> >  			if (ret == -EEXIST) {
> >  				ret = 0;
> >
> > -				if (!is_swbp_at_addr(vma->vm_mm, vaddr))
> > +				if (!is_swbp_at_addr(vma->vm_mm, vaddr)) {
> > +					put_uprobe(uprobe);
> >  					continue;
> > +				}
> 
> Yes, this part looks correct.
> 
> In fact, I think this is not really correct anyway (wrt counter)
> but we are going to kill it.
> 
> 

Are you expecting the counter to be decreased/increased here?

This is case where the uprobe_mmap() and uprobe_unregister() raced, and
by the time install_breakpoint() was called by uprobe_mmap(), there were
no consumers.  i.e there are no uprobe->consumers and the underlying
instruction is still not a breakpoint instruction. 

Since we are refusing to add a breakpoint and that there is no
breakpoint, there is no need to increment/decrement the counter here.

Do let me know if I have missed something.

-- 
Thanks and Regards
Srikar

--
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