stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Meelis Roos <mroos@linux.ee>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Oberparleiter <oberpar@linux.vnet.ibm.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 3.13 31/40] x86, hweight: Fix BUG when booting with CONFIG_GCOV_PROFILE_ALL=y
Date: Tue, 18 Feb 2014 14:47:32 -0800	[thread overview]
Message-ID: <20140218224434.212367390@linuxfoundation.org> (raw)
In-Reply-To: <20140218224433.337299968@linuxfoundation.org>

3.13-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>

commit 6583327c4dd55acbbf2a6f25e775b28b3abf9a42 upstream.

Commit d61931d89b, "x86: Add optimized popcnt variants" introduced
compile flag -fcall-saved-rdi for lib/hweight.c. When combined with
options -fprofile-arcs and -O2, this flag causes gcc to generate
broken constructor code. As a result, a 64 bit x86 kernel compiled
with CONFIG_GCOV_PROFILE_ALL=y prints message "gcov: could not create
file" and runs into sproadic BUGs during boot.

The gcc people indicate that these kinds of problems are endemic when
using ad hoc calling conventions.  It is therefore best to treat any
file compiled with ad hoc calling conventions as an isolated
environment and avoid things like profiling or coverage analysis,
since those subsystems assume a "normal" calling conventions.

This patch avoids the bug by excluding lib/hweight.o from coverage
profiling.

Reported-by: Meelis Roos <mroos@linux.ee>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/52F3A30C.7050205@linux.vnet.ibm.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 lib/Makefile |    1 +
 1 file changed, 1 insertion(+)

--- a/lib/Makefile
+++ b/lib/Makefile
@@ -43,6 +43,7 @@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o
 obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 
+GCOV_PROFILE_hweight.o := n
 CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS))
 obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
 



  parent reply	other threads:[~2014-02-18 22:47 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 22:47 [PATCH 3.13 00/40] 3.13.4-stable review Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 01/40] SELinux: Fix kernel BUG on empty security contexts Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 02/40] Btrfs: disable snapshot aware defrag for now Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 03/40] crypto: s390 - fix concurrency issue in aes-ctr mode Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 04/40] crypto: s390 - fix des and des3_ede cbc concurrency issue Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 05/40] crypto: s390 - fix des and des3_ede ctr " Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 06/40] NFSv4.1: nfs4_destroy_session must call rpc_destroy_waitqueue Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 07/40] NFSv4: Fix memory corruption in nfs4_proc_open_confirm Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 08/40] regulator: core: Correct default return value for full constraints Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 09/40] irqchip: armada-370-xp: fix IPI race condition Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 10/40] irqchip: armada-370-xp: fix MSI " Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 11/40] arm64: vdso: update wtm fields for CLOCK_MONOTONIC_COARSE Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 12/40] arm64: atomics: fix use of acquire + release for full barrier semantics Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 13/40] arm64: vdso: prevent ld from aligning PT_LOAD segments to 64k Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 14/40] arm64: Invalidate the TLB when replacing pmd entries during boot Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 15/40] arm64: vdso: fix coarse clock handling Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 16/40] arm64: add DSB after icache flush in __flush_icache_all() Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 17/40] ALSA: usb-audio: Add missing kconfig dependecy Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 18/40] ALSA: hda - Fix missing VREF setup for Mac Pro 1,1 Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 19/40] ALSA: hda - Fix silent output on Toshiba Satellite L40 Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 20/40] ALSA: hda - Add missing mixer widget for AD1983 Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 21/40] ALSA: hda - Improve loopback path lookups " Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 22/40] mm/swap: fix race on swap_info reuse between swapoff and swapon Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 23/40] mm: __set_page_dirty_nobuffers() uses spin_lock_irqsave() instead of spin_lock_irq() Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 24/40] mm: __set_page_dirty uses spin_lock_irqsave instead of spin_lock_irq Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 25/40] x86: mm: change tlb_flushall_shift for IvyBridge Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 26/40] [media] af9035: add ID [2040:f900] Hauppauge WinTV-MiniStick 2 Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 27/40] [media] mxl111sf: Fix unintentional garbage stack read Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 29/40] [media] Revert "[media] videobuf_vm_{open,close} race fixes" Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 30/40] [media] cx24117: use a valid dev pointer for dev_err printout Greg Kroah-Hartman
2014-02-18 22:47 ` Greg Kroah-Hartman [this message]
2014-02-18 22:47 ` [PATCH 3.13 32/40] genirq: Generic irq chip requires IRQ_DOMAIN Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 33/40] pinctrl: at91: use locked variant of irq_set_handler Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 34/40] pinctrl: imx27: fix wrong offset to ICONFB Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 35/40] pinctrl: imx27: fix offset calculation in imx_read_2bit Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 36/40] pinctrl: vt8500: Change devicetree data parsing Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 37/40] pinctrl: protect pinctrl_list add Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 38/40] bcache: fix BUG_ON due to integer overflow with GC_SECTORS_USED Greg Kroah-Hartman
2014-02-18 22:47 ` [PATCH 3.13 39/40] intel_pstate: Take core C0 time into account for core busy calculation Greg Kroah-Hartman
2014-02-19 12:52   ` Stefan Lippers-Hollmann
2014-02-19 16:41     ` Dirk Brandewie
2014-02-18 22:47 ` [PATCH 3.13 40/40] ARM: imx6: Initialize low-power mode early again Greg Kroah-Hartman
2014-02-19  4:30 ` [PATCH 3.13 00/40] 3.13.4-stable review Guenter Roeck
2014-02-20 18:32   ` Greg Kroah-Hartman
2014-02-20 23:23     ` Guenter Roeck
2014-02-20 23:32       ` Greg Kroah-Hartman
2014-02-21  2:49         ` Guenter Roeck
2014-02-20  0:16 ` Shuah Khan
2014-02-20  0:36   ` Mark Brown
2014-02-20  1:20     ` Shuah Khan
2014-02-20  2:34       ` Mark Brown
2014-02-20 13:40         ` Shuah Khan
2014-02-20 14:45           ` Mark Brown
2014-02-20 18:29   ` Greg Kroah-Hartman
2014-02-20 10:26 ` Satoru Takeuchi
2014-02-20 18:31   ` Greg Kroah-Hartman

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=20140218224434.212367390@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=oberpar@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).