linux-kernel.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,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [ 45/75] s390: critical section cleanup vs. machine checks
Date: Mon, 18 Mar 2013 14:07:08 -0700	[thread overview]
Message-ID: <20130318210513.493721358@linuxfoundation.org> (raw)
In-Reply-To: <20130318210510.203500214@linuxfoundation.org>

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

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

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

commit 6551fbdfd8b85d1ab5822ac98abb4fb449bcfae0 upstream.

The current machine check code uses the registers stored by the machine
in the lowcore at __LC_GPREGS_SAVE_AREA as the registers of the interrupted
context. The registers 0-7 of a user process can get clobbered if a machine
checks interrupts the execution of a critical section in entry[64].S.

The reason is that the critical section cleanup code may need to modify
the PSW and the registers for the previous context to get to the end of a
critical section. If registers 0-7 have to be replaced the relevant copy
will be in the registers, which invalidates the copy in the lowcore. The
machine check handler needs to explicitly store registers 0-7 to the stack.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/s390/kernel/entry.S   |    3 ++-
 arch/s390/kernel/entry64.S |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -636,7 +636,8 @@ ENTRY(mcck_int_handler)
 	UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER
 mcck_skip:
 	SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT
-	mvc	__PT_R0(64,%r11),__LC_GPREGS_SAVE_AREA
+	stm	%r0,%r7,__PT_R0(%r11)
+	mvc	__PT_R8(32,%r11),__LC_GPREGS_SAVE_AREA+32
 	stm	%r8,%r9,__PT_PSW(%r11)
 	xc	__SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
 	l	%r1,BASED(.Ldo_machine_check)
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -678,8 +678,9 @@ ENTRY(mcck_int_handler)
 	UPDATE_VTIME %r14,__LC_MCCK_ENTER_TIMER
 	LAST_BREAK %r14
 mcck_skip:
-	lghi	%r14,__LC_GPREGS_SAVE_AREA
-	mvc	__PT_R0(128,%r11),0(%r14)
+	lghi	%r14,__LC_GPREGS_SAVE_AREA+64
+	stmg	%r0,%r7,__PT_R0(%r11)
+	mvc	__PT_R8(64,%r11),0(%r14)
 	stmg	%r8,%r9,__PT_PSW(%r11)
 	xc	__SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
 	lgr	%r2,%r11		# pass pointer to pt_regs



  parent reply	other threads:[~2013-03-18 21:56 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 21:06 [ 00/75] 3.8.4-stable review Greg Kroah-Hartman
2013-03-18 21:06 ` [ 01/75] qcaux: add Franklin U600 Greg Kroah-Hartman
2013-03-18 21:06 ` [ 02/75] xen/pciback: Dont disable a PCI device that is already disabled Greg Kroah-Hartman
2013-03-18 21:06 ` [ 03/75] virtio: rng: disallow multiple device registrations, fixes crashes Greg Kroah-Hartman
2013-03-18 21:06 ` [ 04/75] USB: option: add Huawei E5331 Greg Kroah-Hartman
2013-03-18 21:06 ` [ 05/75] USB: cdc-wdm: fix buffer overflow Greg Kroah-Hartman
2013-03-18 21:06 ` [ 06/75] tools: usb: ffs-test: Fix build failure Greg Kroah-Hartman
2013-03-18 21:06 ` [ 07/75] usb: dwc3: core: dont forget to free coherent memory Greg Kroah-Hartman
2013-03-18 21:06 ` [ 08/75] usb: cp210x new Vendor/Device IDs Greg Kroah-Hartman
2013-03-18 21:06 ` [ 09/75] USB: added support for Cinterions products AH6 and PLS8 Greg Kroah-Hartman
2013-03-18 21:06 ` [ 10/75] usb: serial: Add Rigblaster Advantage to device table Greg Kroah-Hartman
2013-03-18 21:06 ` [ 11/75] USB: storage: fix Huawei mode switching regression Greg Kroah-Hartman
2013-03-18 21:06 ` [ 12/75] USB: EHCI: work around silicon bug in Intels EHCI controllers Greg Kroah-Hartman
2013-03-19 16:34   ` Sven Joachim
2013-03-19 18:17     ` Alan Stern
2013-03-19 18:43       ` Sven Joachim
2013-03-19 20:10         ` Alan Stern
2013-03-19 20:28           ` Sven Joachim
2013-03-19 21:00             ` Alan Stern
2013-03-19 21:44               ` Sven Joachim
2013-03-20 20:08                 ` Greg Kroah-Hartman
2013-03-20 20:14                   ` Sven Joachim
2013-03-20 20:28                     ` Greg Kroah-Hartman
2013-03-20 20:41                       ` Alan Stern
2013-03-20 22:28                         ` Greg Kroah-Hartman
2013-03-21 14:35                           ` Alan Stern
2013-03-19 18:03   ` Stephen Warren
2013-03-18 21:06 ` [ 13/75] USB: EHCI: dont check DMA values in QH overlays Greg Kroah-Hartman
2013-03-18 21:06 ` [ 14/75] staging: vt6656: Fix oops on resume from suspend Greg Kroah-Hartman
2013-03-18 21:06 ` [ 15/75] staging: comedi: dt9812: use CR_CHAN() for channel number Greg Kroah-Hartman
2013-03-18 21:06 ` [ 16/75] qcserial: bind to DM/DIAG port on Gobi 1K devices Greg Kroah-Hartman
2013-03-18 21:06 ` [ 17/75] signal: always clear sa_restorer on execve Greg Kroah-Hartman
2013-03-18 21:06 ` [ 18/75] ext3: Fix format string issues Greg Kroah-Hartman
2013-03-18 21:06 ` [ 19/75] tty/8250_pnp: serial port detection regression since v3.7 Greg Kroah-Hartman
2013-03-18 21:06 ` [ 20/75] serial: 8250: Keep 8250.<xxxx> module options functional after driver rename Greg Kroah-Hartman
2013-03-18 21:06 ` [ 21/75] serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller Greg Kroah-Hartman
2013-03-18 21:06 ` [ 22/75] tty: serial: fix typo "ARCH_S5P6450" Greg Kroah-Hartman
2013-03-18 21:06 ` [ 23/75] tty: serial: fix typo "SERIAL_S3C2412" Greg Kroah-Hartman
2013-03-18 21:06 ` [ 24/75] tty/serial: Add support for Altera serial port Greg Kroah-Hartman
2013-03-18 21:06 ` [ 25/75] TTY: disable debugging warning Greg Kroah-Hartman
2013-03-18 21:06 ` [ 26/75] TTY: do not reset masters packet mode Greg Kroah-Hartman
2013-03-18 21:06 ` [ 27/75] Fix 4 port and add support for 8 port Unknown PCI serial port cards Greg Kroah-Hartman
2013-03-18 21:06 ` [ 28/75] ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels Greg Kroah-Hartman
2013-03-18 21:06 ` [ 29/75] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume Greg Kroah-Hartman
2013-03-18 21:11   ` Stephane Eranian
2013-03-18 21:20     ` Greg Kroah-Hartman
2013-03-18 21:35       ` Stephane Eranian
2013-03-18 23:00         ` Greg Kroah-Hartman
2013-03-18 21:06 ` [ 30/75] ALSA: seq: Fix missing error handling in snd_seq_timer_open() Greg Kroah-Hartman
2013-03-18 21:06 ` [ 31/75] ARM: w1-gpio: fix erroneous gpio requests Greg Kroah-Hartman
2013-03-18 21:06 ` [ 32/75] hwmon: (pmbus/ltc2978) Fix temperature reporting Greg Kroah-Hartman
2013-03-18 21:06 ` [ 33/75] hwmon: (lineage-pem) Add missing terminating entry for pem_[input|fan]_attributes Greg Kroah-Hartman
2013-03-18 21:06 ` [ 34/75] w1-gpio: remove erroneous __exit and __exit_p() Greg Kroah-Hartman
2013-03-18 21:06 ` [ 35/75] w1: fix oops when w1_search is called from netlink connector Greg Kroah-Hartman
2013-03-18 21:06 ` [ 36/75] powerpc: Fix STAB initialization Greg Kroah-Hartman
2013-03-18 21:07 ` [ 37/75] powerpc: Fix cputable entry for 970MP rev 1.0 Greg Kroah-Hartman
2013-03-18 21:07 ` [ 38/75] powerpc: Make VSID_BITS* dependency explicit Greg Kroah-Hartman
2013-03-18 21:07 ` [ 39/75] powerpc: Update kernel VSID range Greg Kroah-Hartman
2013-03-18 21:07 ` [ 40/75] powerpc: Rename USER_ESID_BITS* to ESID_BITS* Greg Kroah-Hartman
2013-03-18 21:07 ` [ 41/75] ARM: davinci: edma: fix dmaengine induced null pointer dereference on da830 Greg Kroah-Hartman
2013-03-19 16:25   ` Luis Henriques
     [not found]   ` <f20a6d0dd7604c0fa6ed95604a8dfb35@DLEE70.ent.ti.com>
2013-03-19 17:27     ` Matt Porter
2013-03-19 18:25       ` Luis Henriques
2013-03-18 21:07 ` [ 42/75] selinux: use GFP_ATOMIC under spin_lock Greg Kroah-Hartman
2013-03-18 21:07 ` [ 43/75] perf,x86: fix wrmsr_on_cpu() warning on suspend/resume Greg Kroah-Hartman
2013-03-18 21:07 ` [ 44/75] perf,x86: fix link failure for non-Intel configs Greg Kroah-Hartman
2013-03-18 21:07 ` Greg Kroah-Hartman [this message]
2013-03-18 21:07 ` [ 46/75] s390/mm: fix flush_tlb_kernel_range() Greg Kroah-Hartman
2013-03-18 21:07 ` [ 47/75] btrfs: use rcu_barrier() to wait for bdev puts at unmount Greg Kroah-Hartman
2013-03-18 21:07 ` [ 48/75] mtd: nand: reintroduce NAND_NO_READRDY as NAND_NEED_READRDY Greg Kroah-Hartman
2013-03-18 21:07 ` [ 49/75] kbuild: fix make headers_check with make 3.80 Greg Kroah-Hartman
2013-03-18 21:07 ` [ 50/75] atmel_lcdfb: fix 16-bpp modes on older SOCs Greg Kroah-Hartman
2013-03-18 21:07 ` [ 51/75] net/mlx4_en: Initialize RFS filters lock and list in init_netdev Greg Kroah-Hartman
2013-03-18 21:07 ` [ 52/75] net/mlx4_en: Disable RFS when running in SRIOV mode Greg Kroah-Hartman
2013-03-18 21:07 ` [ 53/75] block: use i_size_write() in bd_set_size() Greg Kroah-Hartman
2013-03-18 21:07 ` [ 54/75] loopdev: fix a deadlock Greg Kroah-Hartman
2013-03-18 21:07 ` [ 55/75] loopdev: remove an user triggerable oops Greg Kroah-Hartman
2013-03-18 21:07 ` [ 56/75] net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Greg Kroah-Hartman
2013-03-18 21:07 ` [ 57/75] l2tp: Restore socket refcount when sendmsg succeeds Greg Kroah-Hartman
2013-03-18 21:07 ` [ 58/75] atl1c: restore buffer state Greg Kroah-Hartman
2013-03-18 21:07 ` [ 59/75] rds: limit the size allocated by rds_message_alloc() Greg Kroah-Hartman
2013-03-18 21:07 ` [ 60/75] net: ipv6: Dont purge default router if accept_ra=2 Greg Kroah-Hartman
2013-03-18 21:07 ` [ 61/75] tcp: fix double-counted receiver RTT when leaving receiver fast path Greg Kroah-Hartman
2013-03-18 21:07 ` [ 62/75] tun: add a missing nf_reset() in tun_net_xmit() Greg Kroah-Hartman
2013-03-18 21:07 ` [ 63/75] vxlan: fix oops when delete netns containing vxlan Greg Kroah-Hartman
2013-03-18 21:07 ` [ 64/75] bonding: fire NETDEV_RELEASE event only on 0 slaves Greg Kroah-Hartman
2013-03-18 21:07 ` [ 65/75] team: unsyc the devices addresses when port is removed Greg Kroah-Hartman
2013-03-18 21:07 ` [ 66/75] macvlan: Set IFF_UNICAST_FLT flag to prevent unnecessary promisc mode Greg Kroah-Hartman
2013-03-18 21:07 ` [ 67/75] netlabel: correctly list all the static label mappings Greg Kroah-Hartman
2013-03-18 21:07 ` [ 68/75] bridging: fix rx_handlers return code Greg Kroah-Hartman
2013-03-18 21:07 ` [ 69/75] ipv6: stop multicast forwarding to process interface scoped addresses Greg Kroah-Hartman
2013-03-18 21:07 ` [ 70/75] bridge: fix mdb info leaks Greg Kroah-Hartman
2013-03-18 21:07 ` [ 71/75] rtnl: fix info leak on RTM_GETLINK request for VF devices Greg Kroah-Hartman
2013-03-18 21:07 ` [ 72/75] dcbnl: fix various netlink info leaks Greg Kroah-Hartman
2013-03-18 21:07 ` [ 73/75] 6lowpan: Fix endianness issue in is_addr_link_local() Greg Kroah-Hartman
2013-03-18 21:07 ` [ 74/75] Revert "drm/i915: enable irqs earlier when resuming" Greg Kroah-Hartman
2013-03-27 15:45   ` Ilya Tumaykin
2013-03-27 16:52     ` Daniel Vetter
2013-03-18 21:07 ` [ 75/75] Revert "drm/i915: reorder setup sequence to have irqs for output setup" Greg Kroah-Hartman
2013-03-19  0:51 ` [ 00/75] 3.8.4-stable review Shuah Khan
2013-03-19  0:57   ` Greg Kroah-Hartman
2013-03-19  1:09     ` Shuah Khan
2013-03-19  2:00       ` Greg Kroah-Hartman
2013-03-19  4:00         ` Shuah Khan
2013-03-19  4:07           ` Greg Kroah-Hartman
2013-03-19 15:51             ` 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=20130318210513.493721358@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.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).