Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753969AbbEKVLn (ORCPT ); Mon, 11 May 2015 17:11:43 -0400 Received: from 251.110.2.81.in-addr.arpa ([81.2.110.251]:49758 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752544AbbEKVLm (ORCPT ); Mon, 11 May 2015 17:11:42 -0400 Date: Mon, 11 May 2015 22:11:25 +0100 From: One Thousand Gnomes To: Alex Henrie Cc: Kees Cook , "H. Peter Anvin" , Doug Johnson , Thomas Gleixner , Ingo Molnar , Tyler Hicks , Al Viro , linux-kernel@vger.kernel.org Subject: Re: ioperm is preserved across fork and execve, but iopl is not Message-ID: <20150511221125.177336d6@lxorguk.ukuu.org.uk> In-Reply-To: References: Organization: Intel Corporation X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 21 > As recently as October 2012, 32-bit Linux kernels preserved both iopl > and ioperm across fork and execve, but the behavior of iopl changed > with this commit: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/x86/kernel/process_32.c?id=6783eaa2e1253fbcbe2c2f6bb4c843abf1343caf Missed this thread initially. That perhaps does argue for it being safer to put back. > And the man page for iopl continues to state "permissions are > inherited by fork and execve": http://linux.die.net/man/2/iopl > > A test program demonstrating the problem is attached Is there a real world use case ? Alan -- 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/