From patchwork Thu Apr 5 00:15:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 150830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 11B33B6FFA for ; Thu, 5 Apr 2012 10:16:10 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SFaMk-0001AN-Mx; Thu, 05 Apr 2012 00:15:54 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SFaMj-0001AI-BJ for kernel-team@lists.ubuntu.com; Thu, 05 Apr 2012 00:15:53 +0000 Received: from 189.58.23.140.dynamic.adsl.gvt.net.br ([189.58.23.140] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SFaMi-0007Iu-SX for kernel-team@lists.ubuntu.com; Thu, 05 Apr 2012 00:15:53 +0000 From: "Herton R. Krzesinski" To: kernel-team@lists.ubuntu.com Subject: [Oneiric/SRU][PATCH] UBUNTU: SAUCE: (no-up) Reinstate missing hunk from nx emulation Date: Wed, 4 Apr 2012 21:15:49 -0300 Message-Id: <1333584949-1361-1-git-send-email-herton.krzesinski@canonical.com> X-Mailer: git-send-email 1.7.5.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Herton Ronaldo Krzesinski Recently with kernel 3.0.0-18.31, we started to get several bug reports of userspace crashes on launchpad, happening on i386 installs. After reproducing the issue and doing a bisect, we detected that the breakage started with commit 1d43fea ("i387: do not preload FPU state at task switch time"). Looking at that commit, turns out that our application of that change accidentaly removed one piece of i386 NX emulation patch, added with commit 775e6e8 ("UBUNTU: ubuntu: nx-emu - i386: NX emulation"). This adds back the section of code wrongly removed, verified here it fixes the bug as well. BugLink: http://bugs.launchpad.net/bugs/972821 Signed-off-by: Herton Ronaldo Krzesinski --- arch/x86/kernel/process_32.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 98f78e8..2d73f7d 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -307,6 +307,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) fpu = switch_fpu_prepare(prev_p, next_p); + if (next_p->mm) + load_user_cs_desc(cpu, next_p->mm); + /* * Reload esp0. */