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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFw5ccuvvtyf6iuuw-Finr79ZkPxgCxL5jNvdnX5oMYkgg@mail.gmail.com>
Date:	Mon, 21 May 2012 15:00:28 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	mingo@...hat.com, a.p.zijlstra@...llo.nl, peterz@...radead.org,
	anton@...hat.com, rostedt@...dmis.org, tglx@...utronix.de,
	oleg@...hat.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	hpa@...or.com, jkenisto@...ibm.com, andi@...stfloor.org,
	hch@...radead.org, ananth@...ibm.com, vda.linux@...glemail.com,
	masami.hiramatsu.pt@...achi.com, acme@...radead.org,
	srikar@...ux.vnet.ibm.com, sfr@...b.auug.org.au,
	roland@...k.frob.com, mingo@...e.hu,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/uprobes] uprobes, mm, x86: Add the ability to install
 and remove uprobes breakpoints

On Mon, May 21, 2012 at 2:37 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
>
> hm, we seem to have conflicting commits between mainline and linux-next.
> During the merge window.  Again.  Nobody knows why this happens.

I didn't have my trivial cleanup branches in linux-next, I'm afraid.
Usually my pending cleanups are just small patches that I carry along
without even committing them, this time around I had slightly more
than that.

>
> static void unmap_single_vma(struct mmu_gather *tlb,
>                struct vm_area_struct *vma, unsigned long start_addr,
>                unsigned long end_addr,
>                struct zap_details *details)
> {
>        unsigned long start = max(vma->vm_start, start_addr);
>        unsigned long end;
>
>        if (start >= vma->vm_end)
>                return;
>        end = min(vma->vm_end, end_addr);
>        if (end <= vma->vm_start)
>                return;
>
> <<<<<<< HEAD
> =======
>        if (vma->vm_file)
>                uprobe_munmap(vma, start, end);
>
>        if (vma->vm_flags & VM_ACCOUNT)
>                *nr_accounted += (end - start) >> PAGE_SHIFT;
>
>>>>>>>> linux-next/akpm-base

Just remove the VM_ACCOUNT and *nr_accounted lines - they're done in
the caller now. They always should have been, I'm not sure why it was
in the "walk the page tables" path, which has nothing to do with it.

That said, I think that's true of uprobes too. Why the f*ck would
uprobes do it's "munmap" operation when we walk the page tables? This
function was called by more than just the actual unmapping, it was
called by stuff that wants to zap the pages but leave the mapping
around.

So that uprobe_munmap() could probably also be better moved into the
caller - where we actually remove the vma. Maybe.

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