From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755986AbYKULix (ORCPT ); Fri, 21 Nov 2008 06:38:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753235AbYKULip (ORCPT ); Fri, 21 Nov 2008 06:38:45 -0500 Received: from mx1.suse.de ([195.135.220.2]:37872 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909AbYKULio (ORCPT ); Fri, 21 Nov 2008 06:38:44 -0500 Date: Fri, 21 Nov 2008 12:38:42 +0100 Message-ID: From: Takashi Iwai To: "H. Peter Anvin" Cc: Arjan van de Ven , linux-kernel@vger.kernel.org, Luc Verhaegen , Egbert Eich Subject: Re: vm86 segfaults with NX bit In-Reply-To: <4925D596.3010304@zytor.com> References: <20081120085844.6f158e08@infradead.org> <4925D596.3010304@zytor.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 20 Nov 2008 13:24:38 -0800, H. Peter Anvin wrote: > > Takashi Iwai wrote: > >>>> > >>> did the code that mapped this memory setup use PROT_EXEC ? > >> A good question... > >> Luc, Egbert, how does VESA driver handle it? > > > > Just looking through the vesa directory of xorg-server code, PROT_EXEC > > is passed for all mappings, at least. > > > > Please correct me if I'm looking at a wrong place... > > > > Please do an strace of the X server startup up to the point of the crash. Well, it's not exactly a crash. VESA driver catches SIGSEGV in its signal handler, spews the error messages and skips the vm86 operation. The segfault occurs during every vm86old syscall. > I am betting that PROT_EXEC is missing from an mmap(), or that it needs > an additional mprotect(). PROT_EXEC seems used in every mmap. But, VESA and int10 codes in xorg is old and hard to follow for me. Hopefully Egbert can give us a better insight... Takashi