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]
Date:	Wed, 14 Jan 2015 12:57:49 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	jolsa@...nel.org, linux-kernel@...r.kernel.org, lizefan@...wei.com,
	namhyung@...nel.org, a.p.zijlstra@...llo.nl, paulus@...ba.org,
	mingo@...hat.com, acme@...nel.org, masami.hiramatsu.pt@...achi.com
Subject: Re: [PATCH v2] perf: fix dwarf unwind using libunwind.

On Wed, Jan 14, 2015 at 10:36:47AM +0800, Wang Nan wrote:
> Perf tool fails to unwind user stack if the event raises in a shared

SNIP

> +
>  __attribute__ ((noinline))
>  static int krava_3(struct thread *thread)
>  {
> -	return unwind_thread(thread);
> +	struct thread *array[2] = {thread, thread};
> +	void *fp = &bsearch;
> +	/*
> +	 * make _bsearch a volatile function pointer to
> +	 * prevent potential optimization, which may expand
> +	 * bsearch and call compare directly from this function,
> +	 * instead of libc shared object.
> +	 */
> +	void *(*volatile _bsearch)(void *, void *, size_t,
> +			size_t, int (*)(void *, void *));
> +
> +	_bsearch = fp;
> +	_bsearch(array, &thread, 2, sizeof(struct thread **), compare);
> +	return global_unwind_retval;
>  }

ah, I've got confused with the NO_LIBUNWIND_DEBUG_FRAME name
and got the impression that we could use it in the tests/make
as another compile option test..

but your change is even better ;-) thanks for updating this test


Acked-by: Jiri Olsa <jolsa@...nel.org>


thanks,
jirka
--
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