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:	Tue, 18 Nov 2014 23:15:16 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	linux-kernel@...r.kernel.org
Cc:	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, williams@...hat.com,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 2/2] ftrace/x86/extable: Add is_ftrace_trampoline()
 function

On Tue, 18 Nov 2014 22:33:33 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:


> +/*
> + * This is used by __kernel_text_address() to return true if the
> + * the address is on a dynamically allocated trampoline that would
> + * not return true for either core_kernel_text() or
> + * is_module_text_address().
> + */
> +bool is_ftrace_trampoline(unsigned long addr)
> +{
> +	struct ftrace_ops *op;
> +
> +	do_for_each_ftrace_op(op, ftrace_ops_list) {
> +		/*
> +		 * This is to check for dynamically allocated trampolines.
> +		 * Trampolines that are in kernel text will have
> +		 * core_kernel_text() return true.
> +		 */
> +		if (op->trampoline && op->trampoline_size)
> +			if (addr >= op->trampoline &&
> +			    addr < op->trampoline + op->trampoline_size)
> +				return true;
> +	} while_for_each_ftrace_op(op);
> +
> +	return false;
> +}
> +

Hmm, preemption should be disabled here. We can't guarantee that the
caller will have that. Will update.

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