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: <20140521085335.GA29630@linux.vnet.ibm.com>
Date:	Wed, 21 May 2014 14:23:35 +0530
From:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Denys Vlasenko <dvlasenk@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uprobes: Shift ->readpage check from __copy_insn() to
 uprobe_register()

* Oleg Nesterov <oleg@...hat.com> [2014-05-19 20:40:54]:

> Sorry for double-posting, but it seems that this patch didn't reach
> lkml. Let me resend it just on case. Plus another patch in reply, on
> top of this change.
> 
> -------------------------------------------------------------------------------
> Subject: [PATCH] uprobes: Shift ->readpage check from __copy_insn() to uprobe_register()
> 
> copy_insn() fails with -EIO if ->readpage == NULL, but this error
> is not propagated unless uprobe_register() path finds ->mm which
> already mmaps this file. In this case (say) "perf record" does not
> actually install the probe, but the user can't know about this.
> 
> Move this check into uprobe_register() so that this problem can be
> detected earlier and reported to user.
> 
> Note: this is still not perfect,
> 
> 	- copy_insn() and arch_uprobe_analyze_insn() should be called
> 	  by uprobe_register() but this is not simple, we need vm_file
> 	  for read_mapping_page() (although perhaps we can pass NULL),
> 	  and we need ->mm for is_64bit_mm() (although this logic is
> 	  broken anyway).
> 
> 	- uprobe_register() should be called by create_trace_uprobe(),
> 	  not by probe_event_enable(), so that an error can be detected
> 	  at "perf probe -x" time. This also needs more changes in the
> 	  core uprobe code, uprobe register/unregister interface was
> 	  poorly designed from the very beginning.
> 
> Reported-by: Denys Vlasenko <dvlasenk@...hat.com>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>

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

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