From owner-freebsd-current@FreeBSD.ORG Tue Oct 18 15:44:40 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7081065673 for ; Tue, 18 Oct 2011 15:44:40 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 84A938FC0C for ; Tue, 18 Oct 2011 15:44:40 +0000 (UTC) Received: by gyd8 with SMTP id 8so914122gyd.13 for ; Tue, 18 Oct 2011 08:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=Vtjx6I49yk4lUCmExwrmfsjx5EXvNiomYei0XWPwgLY=; b=i60ABqsZoLxlUfaN/UTZk9XorAbIerE0dre3f8DyYSdzf8M1SU/UuhxmTaPmkVenhI YoCA02W9p9ZjmaFjdO/y4xdrM6b9VtFSU1yjT3RYk9vaaYAxL/frBJMew53LryQNfn6Z XqFSuVg63nZiDPpaJ/VFlKNnrs2AMqGUc9Gdw= Received: by 10.68.209.103 with SMTP id ml7mr6001379pbc.17.1318952679369; Tue, 18 Oct 2011 08:44:39 -0700 (PDT) Received: from c-24-6-49-154.hsd1.ca.comcast.net (c-24-6-49-154.hsd1.ca.comcast.net. [24.6.49.154]) by mx.google.com with ESMTPS id v7sm8418240pbr.10.2011.10.18.08.44.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Oct 2011 08:44:38 -0700 (PDT) Date: Tue, 18 Oct 2011 08:44:32 -0700 (PDT) From: Garrett Cooper To: Arnaud Lacombe In-Reply-To: Message-ID: References: <20111018090750.GG50300@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="967339439-1671183406-1318952678=:38610" Cc: Kostik Belousov , current@freebsd.org, Oliver Pinter Subject: Re: [RFC] Enable nxstack by default X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 15:44:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --967339439-1671183406-1318952678=:38610 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 18 Oct 2011, Arnaud Lacombe wrote: > Hi, > > On Tue, Oct 18, 2011 at 5:07 AM, Kostik Belousov wrote: >> On Mon, Oct 17, 2011 at 09:30:56PM +0200, Oliver Pinter wrote: >>> Hi all! >>> >>> I think, it's the time to enable the nxstack feature. Any comments, >>> pros, cons? >> >> I dragged the change long enough for it to miss the 9.0. >> After the 9.0 is released, I will flip the switch with the following >> change. >> >> diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c >> index 8455f48..926fe64 100644 >> --- a/sys/kern/imgact_elf.c >> +++ b/sys/kern/imgact_elf.c >> @@ -118,7 +118,12 @@ static int elf_legacy_coredump = 0; >>  SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW, >>     &elf_legacy_coredump, 0, ""); >> >> -static int __elfN(nxstack) = 0; >> +int __elfN(nxstack) = >> +#if defined(__amd64__) || defined(__powerpc64__) /* both 64 and 32 bit */ >> > Why leaving 32bits x86 CPU supporting the NX feature behind ? Most likely because it was assumed that i386 doesn't fully support it. According to ye great Wikipedia, NX support didn't roll into i386 until Prescott, which was pretty late in the non-64-bit capable family of CPUs, as its successor -- Conroe -- was 64-bit. Intel detuned some of the early Dual Core Pentiums, e.g. the Yonahs to not talk 64-bit. Not sure about AMD. There are probably more details in binutils, gcc, etc, that I'm missing and Kostik can expound on. -Garrett --967339439-1671183406-1318952678=:38610--