Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932348AbcCBBGL (ORCPT ); Tue, 1 Mar 2016 20:06:11 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:56744 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754575AbcCAX4B (ORCPT ); Tue, 1 Mar 2016 18:56:01 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=DlCKy3a6m/HDAqckjIfmdLoF2EXFsGsCPpcFq/iv93Cv8eNXZeRep6jn1giIf10Bm8kdecD7bnSb Ci8JavW1uqmxGuDKHOyL/6Zxsmuohjtt9amTh5b2Ch9xI0l2LJBjXtgmp9P/+wkhm3pPRvLLd8i3 v6bjtrVeTldCzaoDtMM=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 100/342] s390/fpu: signals vs. floating point control register X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Martin Schwidefsky Message-Id: <20160301234531.206988507@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.55cfb3b3edad45f7b9e050ccd90008c5 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:16 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1357 Lines: 41 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Schwidefsky commit 1b17cb796f5d40ffa239c6926385abd83a77a49b upstream. git commit 904818e2f229f3d94ec95f6932a6358c81e73d78 "s390/kernel: introduce fpu-internal.h with fpu helper functions" introduced the fpregs_store / fp_regs_load helper. These function fail to save and restore the floating pointer control registers. The effect is that the FPC is not correctly handled on signal delivery and signal return. Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/include/asm/fpu/internal.h | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/s390/include/asm/fpu/internal.h +++ b/arch/s390/include/asm/fpu/internal.h @@ -48,6 +48,7 @@ static inline void convert_fp_to_vx(__ve static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) { fpregs->pad = 0; + fpregs->fpc = fpu->fpc; if (MACHINE_HAS_VX) convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs); else @@ -57,6 +58,7 @@ static inline void fpregs_store(_s390_fp static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu) { + fpu->fpc = fpregs->fpc; if (MACHINE_HAS_VX) convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs); else