All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Josh Poimboeuf <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	torvalds@linux-foundation.org, hpa@zytor.com,
	a.p.zijlstra@chello.nl, jpoimboe@redhat.com,
	peterz@infradead.org, mingo@kernel.org
Subject: [tip:core/urgent] objtool, compiler.h: Fix __unreachable section relocation size
Date: Wed, 1 Mar 2017 04:45:54 -0800	[thread overview]
Message-ID: <tip-a6ae17f553bf9b4a0c7f8534e5f0f983bc7955c7@git.kernel.org> (raw)
In-Reply-To: <20170301060504.oltm3iws6fmubnom@treble>

Commit-ID:  a6ae17f553bf9b4a0c7f8534e5f0f983bc7955c7
Gitweb:     http://git.kernel.org/tip/a6ae17f553bf9b4a0c7f8534e5f0f983bc7955c7
Author:     Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Wed, 1 Mar 2017 00:05:04 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 1 Mar 2017 13:43:05 +0100

objtool, compiler.h: Fix __unreachable section relocation size

Linus reported the following commit broke module loading on his laptop:

  d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")

It showed errors like the following:

  module: overflow in relocation type 10 val ffffffffc02afc81
  module: 'nvme' likely not compiled with -mcmodel=kernel

The problem is that the __unreachable section addresses are stored using
the '.long' asm directive, which isn't big enough for .text section
relative kernel addresses.  Use relative addresses instead:

  ".long %c0b - .\t\n"

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")
Link: http://lkml.kernel.org/r/20170301060504.oltm3iws6fmubnom@treble
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/compiler-gcc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 76e28c2..b6bb901 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -201,7 +201,7 @@
 #define annotate_unreachable() ({					\
 	asm("%c0:\t\n"							\
 	    ".pushsection __unreachable, \"a\"\t\n"			\
-	    ".long %c0b\t\n"						\
+	    ".long %c0b - .\t\n"					\
 	    ".popsection\t\n" : : "i" (__LINE__));			\
 })
 #else

  parent reply	other threads:[~2017-03-01 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28  7:53 [GIT PULL] objtool fixes Ingo Molnar
2017-03-01  1:55 ` Linus Torvalds
2017-03-01  6:05   ` Josh Poimboeuf
2017-03-01  8:10     ` [tip:core/urgent] objtool: Fix __unreachable section relocation size tip-bot for Josh Poimboeuf
2017-03-01  8:15       ` hpa
2017-03-01 12:41         ` Josh Poimboeuf
2017-03-01 12:44           ` [PATCH] objtool, compiler.h: " Ingo Molnar
2017-03-01 12:56             ` Josh Poimboeuf
2017-03-01 10:37       ` [tip:core/urgent] objtool: " Ingo Molnar
2017-03-01 12:43         ` Josh Poimboeuf
2017-03-01 12:45     ` tip-bot for Josh Poimboeuf [this message]
2017-03-01 13:24     ` [tip:core/urgent] objtool, compiler.h: " tip-bot for Josh Poimboeuf

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=tip-a6ae17f553bf9b4a0c7f8534e5f0f983bc7955c7@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.