Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753670AbbEKUuJ (ORCPT ); Mon, 11 May 2015 16:50:09 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:35429 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753112AbbEKUuH (ORCPT ); Mon, 11 May 2015 16:50:07 -0400 From: Alex Henrie To: Kees Cook , "H. Peter Anvin" , Doug Johnson , Thomas Gleixner , Ingo Molnar , Tyler Hicks , Al Viro , linux-kernel@vger.kernel.org Cc: Alex Henrie Subject: [PATCH] x86: Preserve iopl on fork and execve Date: Mon, 11 May 2015 14:49:58 -0600 Message-Id: <1431377398-12046-1-git-send-email-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.4.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 41 Signed-off-by: Alex Henrie Suggested-by: Doug Johnson --- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 8ed2106..86bfe7c 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -205,7 +205,7 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) regs->cs = __USER_CS; regs->ip = new_ip; regs->sp = new_sp; - regs->flags = X86_EFLAGS_IF; + regs->flags |= X86_EFLAGS_IF; force_iret(); } EXPORT_SYMBOL_GPL(start_thread); diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index ddfdbf7..fc22e5d 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -238,7 +238,7 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip, regs->sp = new_sp; regs->cs = _cs; regs->ss = _ss; - regs->flags = X86_EFLAGS_IF; + regs->flags |= X86_EFLAGS_IF; force_iret(); } -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/