public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: stack validation warning on lttng-modules bytecode interpreter
Date: Wed, 15 Jun 2016 16:55:16 +0000 (UTC)	[thread overview]
Message-ID: <1074038231.37468.1466009716273.JavaMail.zimbra@efficios.com> (raw)

Hi Josh,

I notice that with gcc 6.1.1, kernel 4.6, with
CONFIG_STACK_VALIDATION=y, building lttng-modules master
at commit 6c09dd94 gives this warning:

lttng-modules/lttng-filter-interpreter.o: warning: objtool: 
lttng_filter_interpret_bytecode()+0x58: sibling call from callable instruction with changed frame pointer

this object implements a bytecode interpreter using an explicit
jump table (see https://github.com/lttng/lttng-modules/blob/master/lttng-filter-interpreter.c)

If I define "INTERPRETER_USE_SWITCH" at the top of the file,
thus using the switch-case fallback implementation, the
warning vanishes.

We use an explicit jump table rather than a switch case whenever
possible for performance reasons.

I notice that tools/objtool/builtin-check.c needs to be aware of
switch-cases transformed into jump tables by the compiler. Are
explicit jump tables supported by the stack validator ? Do we
need to add annotation to our code ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

             reply	other threads:[~2016-06-15 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 16:55 Mathieu Desnoyers [this message]
2016-06-15 18:18 ` stack validation warning on lttng-modules bytecode interpreter Josh Poimboeuf
2016-06-15 19:13   ` Mathieu Desnoyers
2016-06-15 19:38     ` Josh Poimboeuf
2016-06-15 20:01       ` Mathieu Desnoyers
2016-06-15 20:24         ` Josh Poimboeuf
2016-06-15 20:28           ` Josh Poimboeuf
2016-06-15 20:42             ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1074038231.37468.1466009716273.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lttng-dev@lists.lttng.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox