From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755692AbcIMMQz (ORCPT ); Tue, 13 Sep 2016 08:16:55 -0400 Received: from ozlabs.org ([103.22.144.67]:44416 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754612AbcIMMQk (ORCPT ); Tue, 13 Sep 2016 08:16:40 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: e1c0d66fcb179a1737b3d5cc11c6e37bcabbd861 In-Reply-To: <1469520361-9035-1-git-send-email-wei.guo.simon@gmail.com> To: Simon Guo From: Michael Ellerman Cc: Michael Neuling , "Amanieu d'Antras" , Simon Guo , linux-kernel@vger.kernel.org, Paul Mackerras , Anton Blanchard , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Cyril Bur Subject: Re: powerpc: set used_vsr/used_vr/used_spe in sigreturn path when MSR bits are active Message-Id: <3sYNvV5Mb5z9svs@ozlabs.org> Date: Tue, 13 Sep 2016 22:16:38 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-26-07 at 08:06:01 UTC, Simon Guo wrote: > From: Simon Guo > > Normally, when MSR[VSX/VR/SPE] bits = 1, the used_vsr/used_vr/used_spe > bit have already been set. However signal frame locates at user space > and it is controlled by user application. It is up to kernel to make > sure used_vsr/used_vr/used_spe(in kernel)=1 and consistent with MSR > bits. > > For example, CRIU application, who utilizes sigreturn to restore > checkpointed process, will lead to the case where MSR[VSX] bit is > active in signal frame, but used_vsx bit is not set. (the same applies > to VR/SPE). > > This patch will reinforce this at kernel by always setting used_* bit > when MSR related bits are active in signal frame and we are doing > sigreturn. > > This patch is based on Ben's Proposal. > > Signed-off-by: Benjamin Herrenschmidt > Signed-off-by: Simon Guo Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e1c0d66fcb179a1737b3d5cc11 cheers