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, Jan Engelhardt <jengelh@inai.de>,
	linux-arch@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 3.14 36/42] vm: make stack guard page errors return VM_FAULT_SIGSEGV rather than SIGBUS
Date: Sun, 26 Apr 2015 16:01:55 +0200	[thread overview]
Message-ID: <20150426134249.733487085@linuxfoundation.org> (raw)
In-Reply-To: <20150426134248.160161895@linuxfoundation.org>

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

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

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 9c145c56d0c8a0b62e48c8d71e055ad0fb2012ba upstream.

The stack guard page error case has long incorrectly caused a SIGBUS
rather than a SIGSEGV, but nobody actually noticed until commit
fee7e49d4514 ("mm: propagate error from stack expansion even for guard
page") because that error case was never actually triggered in any
normal situations.

Now that we actually report the error, people noticed the wrong signal
that resulted.  So far, only the test suite of libsigsegv seems to have
actually cared, but there are real applications that use libsigsegv, so
let's not wait for any of those to break.

Reported-and-tested-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Jan Engelhardt <jengelh@inai.de>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
Cc: linux-arch@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3236,7 +3236,7 @@ static int do_anonymous_page(struct mm_s
 
 	/* Check if we need to add a guard page to the stack */
 	if (check_stack_guard_page(vma, address) < 0)
-		return VM_FAULT_SIGBUS;
+		return VM_FAULT_SIGSEGV;
 
 	/* Use the zero-page for reads */
 	if (!(flags & FAULT_FLAG_WRITE)) {



  parent reply	other threads:[~2015-04-26 14:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26 14:01 [PATCH 3.14 00/42] 3.14.40-stable review Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 01/42] tcp: prevent fetching dst twice in early demux code Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 02/42] net/mlx4_en: Call register_netdevice in the proper location Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 03/42] ipv6: Dont reduce hop limit for an interface Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 04/42] tcp: fix FRTO undo on cumulative ACK of SACKed range Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 05/42] ipv6: protect skb->sk accesses from recursive dereference inside the stack Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 06/42] tcp: tcp_make_synack() should clear skb->tstamp Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 07/42] 8139cp: Call dev_kfree_skby_any instead of kfree_skb Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 08/42] 8139too: Call dev_kfree_skby_any instead of dev_kfree_skb Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 09/42] r8169: " Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 10/42] bonding: Call dev_kfree_skby_any instead of kfree_skb Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 11/42] bnx2: Call dev_kfree_skby_any instead of dev_kfree_skb Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 12/42] tg3: " Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 13/42] ixgb: " Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 14/42] mlx4: " Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 15/42] benet: Call dev_kfree_skby_any instead of kfree_skb Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 16/42] gianfar: Carefully free skbs in functions called by netpoll Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 17/42] Bluetooth: Enable Atheros 0cf3:311e for firmware upload Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 18/42] Bluetooth: Add firmware update for Atheros 0cf3:311f Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 19/42] Bluetooth: btusb: Add IMC Networks (Broadcom based) Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 20/42] Bluetooth: sort the list of IDs in the source code Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 21/42] Bluetooth: append new supported device to the list [0b05:17d0] Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 22/42] Bluetooth: Add support for Intel bootloader devices Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 23/42] Bluetooth: Ignore isochronous endpoints for Intel USB bootloader Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 24/42] Bluetooth: Add support for Acer [13D3:3432] Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 25/42] Bluetooth: Add support for Broadcom device of Asus Z97-DELUXE motherboard Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 26/42] Add a new PID/VID 0227/0930 for AR3012 Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 27/42] Bluetooth: Add support for Acer [0489:e078] Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 28/42] Bluetooth: ath3k: Add support of MCI 13d3:3408 bt device Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 29/42] Bluetooth: Add USB device 04ca:3010 as Atheros AR3012 Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 30/42] mm: hwpoison: drop lru_add_drain_all() in __soft_offline_page() Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 31/42] netfilter: conntrack: disable generic tracking for known protocols Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 32/42] KVM: x86: SYSENTER emulation is broken Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 33/42] move d_rcu from overlapping d_child to overlapping d_alias Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 34/42] sched: declare pid_alive as inline Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 35/42] vm: add VM_FAULT_SIGSEGV handling support Greg Kroah-Hartman
2015-04-26 14:01 ` Greg Kroah-Hartman [this message]
2015-04-26 14:01 ` [PATCH 3.14 37/42] ARM: 8108/1: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 38/42] ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 39/42] x86: mm: move mmap_sem unlock from mm_fault_error() to caller Greg Kroah-Hartman
2015-04-26 14:01 ` [PATCH 3.14 40/42] sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel Greg Kroah-Hartman
2015-04-26 14:02 ` [PATCH 3.14 41/42] mm: softdirty: unmapped addresses between VMAs are clean Greg Kroah-Hartman
2015-04-26 14:02 ` [PATCH 3.14 42/42] proc/pagemap: walk page tables under pte lock Greg Kroah-Hartman
2015-04-26 20:03 ` [PATCH 3.14 00/42] 3.14.40-stable review Guenter Roeck
2015-04-27 17:19 ` Shuah Khan

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=20150426134249.733487085@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=jengelh@inai.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --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 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).