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: <8e62abf1-2937-efb0-a4fa-f2987e3bca0f@linux.vnet.ibm.com>
Date:   Thu, 26 Oct 2017 13:37:38 +0530
From:   ravi <ravi.bangoria@...ux.vnet.ibm.com>
To:     acme@...nel.org, mhiramat@...nel.org
Cc:     peterz@...radead.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, elfring@...rs.sourceforge.net,
        kjlx@...pleofstupid.com, naveen.n.rao@...ux.vnet.ibm.com,
        linux-kernel@...r.kernel.org,
        Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Subject: Re: [PATCH] perf probe: Restrict user to use only one executable with
 -V

Oops! this will disable support for multiple functions from single
binary. (-x binary -V fun1 -V fun2)

Sorry for the noise. Please ignore the patch. Will revise it.

Thanks,
Ravi

On Thursday 26 October 2017 01:21 PM, Ravi Bangoria wrote:
> If multiple executables (-x) are specified with 'perf probe',
> listing variables only considers first executable. Ex,
>
>    $ perf probe -V do_sys_open -x ./test -V fun
>      Failed to find debug information for address 40
>      Debuginfo analysis failed.
>        Error: Failed to show vars.
>      Available variables at do_sys_open
>              @<do_sys_open+0>
>                      char*   filename
>                      int     dfd
>                      int     flags
>                      struct open_flags       op
>                      umode_t mode
>
> Here, first executable is kernel and second is 'test'. Instead
> of finding 'fun()' from 'test', perf is looking for 'fun()' in
> kernel. Fix this by restricting user to use only one executable
> with -V.
>
>    $ perf probe -V do_sys_open -x ./test -V fun
>      Error: Multiple executables are not allowed.
>
>    $ perf probe -V do_sys_open
>      Available variables at do_sys_open
>              @<do_sys_open+0>
>                      char*   filename
>                      int     dfd
>                      int     flags
>                      struct open_flags       op
>                      umode_t mode
>
>    $ perf probe -x ./test -V fun
>      Available variables at fun
>              @<fun+0>
>                      int     arg
>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
> ---
>   tools/perf/util/probe-event.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index b7aaf9b..0e04015 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -1128,6 +1128,11 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
>   	int i, ret = 0;
>   	struct debuginfo *dinfo;
>
> +	if (npevs > 1) {
> +		pr_err("Error: Multiple executables are not allowed.\n");
> +		return 0;
> +	}
> +
>   	ret = init_probe_symbol_maps(pevs->uprobes);
>   	if (ret < 0)
>   		return ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ