From owner-freebsd-amd64@FreeBSD.ORG Mon Oct 29 07:56:21 2012 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7219FB70; Mon, 29 Oct 2012 07:56:21 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-legacy2.sentex.ca (freebsd-legacy2.sentex.ca [IPv6:2607:f3e0:0:3::6502:9c]) by mx1.freebsd.org (Postfix) with ESMTP id 2411E8FC12; Mon, 29 Oct 2012 07:56:21 +0000 (UTC) Received: from freebsd-legacy2.sentex.ca (localhost [127.0.0.1]) by freebsd-legacy2.sentex.ca (8.14.5/8.14.5) with ESMTP id q9T7uK8J013380; Mon, 29 Oct 2012 07:56:20 GMT (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-legacy2.sentex.ca (8.14.5/8.14.5/Submit) id q9T7uKRH013379; Mon, 29 Oct 2012 07:56:20 GMT (envelope-from tinderbox@freebsd.org) Date: Mon, 29 Oct 2012 07:56:20 GMT Message-Id: <201210290756.q9T7uKRH013379@freebsd-legacy2.sentex.ca> X-Authentication-Warning: freebsd-legacy2.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Subject: [releng_8 tinderbox] failure on amd64/amd64 Precedence: bulk X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 07:56:21 -0000 TB --- 2012-10-29 06:36:49 - tinderbox 2.9 running on freebsd-legacy2.sentex.ca TB --- 2012-10-29 06:36:49 - FreeBSD freebsd-legacy2.sentex.ca 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-10-29 06:36:49 - starting RELENG_8 tinderbox run for amd64/amd64 TB --- 2012-10-29 06:36:49 - cleaning the object tree TB --- 2012-10-29 06:36:49 - checking out /src from svn://svn.freebsd.org/base/stable/8 TB --- 2012-10-29 06:36:49 - cd /tinderbox/RELENG_8/amd64/amd64 TB --- 2012-10-29 06:36:49 - /usr/local/bin/svn cleanup /src TB --- 2012-10-29 06:36:59 - /usr/local/bin/svn update /src TB --- 2012-10-29 06:42:53 - WARNING: /usr/local/bin/svn returned exit code 1 TB --- 2012-10-29 06:42:53 - WARNING: sleeping 30 s and retrying... TB --- 2012-10-29 06:43:23 - /usr/local/bin/svn update /src TB --- 2012-10-29 06:43:29 - At svn revision 242301 TB --- 2012-10-29 06:43:30 - building world TB --- 2012-10-29 06:43:30 - CROSS_BUILD_TESTING=YES TB --- 2012-10-29 06:43:30 - MAKEOBJDIRPREFIX=/obj TB --- 2012-10-29 06:43:30 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-10-29 06:43:30 - SRCCONF=/dev/null TB --- 2012-10-29 06:43:30 - TARGET=amd64 TB --- 2012-10-29 06:43:30 - TARGET_ARCH=amd64 TB --- 2012-10-29 06:43:30 - TZ=UTC TB --- 2012-10-29 06:43:30 - __MAKE_CONF=/dev/null TB --- 2012-10-29 06:43:30 - cd /src TB --- 2012-10-29 06:43:30 - /usr/bin/make -B buildworld >>> World build started on Mon Oct 29 06:43:30 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> stage 5.1: building 32 bit shim libraries >>> World build completed on Mon Oct 29 07:50:31 UTC 2012 TB --- 2012-10-29 07:50:31 - generating LINT kernel config TB --- 2012-10-29 07:50:31 - cd /src/sys/amd64/conf TB --- 2012-10-29 07:50:31 - /usr/bin/make -B LINT TB --- 2012-10-29 07:50:31 - cd /src/sys/amd64/conf TB --- 2012-10-29 07:50:31 - /usr/sbin/config -m LINT TB --- 2012-10-29 07:50:31 - building LINT kernel TB --- 2012-10-29 07:50:31 - CROSS_BUILD_TESTING=YES TB --- 2012-10-29 07:50:31 - MAKEOBJDIRPREFIX=/obj TB --- 2012-10-29 07:50:31 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-10-29 07:50:31 - SRCCONF=/dev/null TB --- 2012-10-29 07:50:31 - TARGET=amd64 TB --- 2012-10-29 07:50:31 - TARGET_ARCH=amd64 TB --- 2012-10-29 07:50:31 - TZ=UTC TB --- 2012-10-29 07:50:31 - __MAKE_CONF=/dev/null TB --- 2012-10-29 07:50:31 - cd /src TB --- 2012-10-29 07:50:31 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Mon Oct 29 07:50:31 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/dev/usb/misc/ufm.c cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/dev/usb/misc/udbp.c cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/dev/usb/input/uep.c cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DGPROF -falign-functions=16 -DGPROF4 -DGUPROF -fno-builtin -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror -pg -mprofiler-epilogue /src/sys/dev/usb/input/uhid.c /src/sys/dev/usb/input/uhid.c: In function 'uhid_probe': /src/sys/dev/usb/input/uhid.c:697: error: 'UQ_UMS_IGNORE' undeclared (first use in this function) /src/sys/dev/usb/input/uhid.c:697: error: (Each undeclared identifier is reported only once /src/sys/dev/usb/input/uhid.c:697: error: for each function it appears in.) *** Error code 1 Stop in /obj/amd64/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-10-29 07:56:20 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-10-29 07:56:20 - ERROR: failed to build LINT kernel TB --- 2012-10-29 07:56:20 - 3461.20 user 699.04 system 4771.47 real http://tinderbox.freebsd.org/tinderbox-releng_8-RELENG_8-amd64-amd64.full From owner-freebsd-amd64@FreeBSD.ORG Mon Oct 29 11:06:30 2012 Return-Path: Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3420B2D for ; Mon, 29 Oct 2012 11:06:30 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9766E8FC17 for ; Mon, 29 Oct 2012 11:06:30 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9TB6UVA028403 for ; Mon, 29 Oct 2012 11:06:30 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9TB6UGp028401 for freebsd-amd64@FreeBSD.org; Mon, 29 Oct 2012 11:06:30 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Oct 2012 11:06:30 GMT Message-Id: <201210291106.q9TB6UGp028401@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-amd64@FreeBSD.org Subject: Current problem reports assigned to freebsd-amd64@FreeBSD.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 11:06:30 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o amd64/173078 amd64 Followup to amd64/170677: FreeBSD 9.x does not boot if o amd64/172926 amd64 [boot] booting hangs after 9.1-RC2 install in 2nd (MBR o amd64/172917 amd64 LuaYAML-Testcases test-suite for lua extension of syck o amd64/171835 amd64 bsdinstall abort on Dell PowerEdge R420 with PERC H310 o amd64/171814 amd64 [panic] bioq_init or bioq_remove (unsure which) o amd64/171556 amd64 stock gcc hangs when building Erlang R15B02 with DTRAC o amd64/171344 amd64 pkg_add -r xorg fails for freebsd 9 system o amd64/171331 amd64 Npviewer is crap o amd64/171250 amd64 ldd32 cannot find some i386 libraries o amd64/171110 amd64 Upgrade 9.1-BETA1 > RC1 issue o amd64/171016 amd64 Install of 9.1 RC1-amd64 using netinst iso stops at 97 o amd64/170677 amd64 FreeBSD 9.x does not boot if 2 hard disks are on syste o amd64/170487 amd64 [boot] Thinkpad X61s cannot boot 9.1-BETA1 o amd64/170410 amd64 gvfs-hal-volume-monitor crashes when new media with in o amd64/170351 amd64 [kernel] [patch] amd64: 64-bit process can't always ge o amd64/170115 amd64 Serial boot broken in 9.0 o amd64/168659 amd64 [boot] FreeBSD 9 - Crash upon booting off install CD ( o amd64/167582 amd64 Compile of MySQL NDB Cluster Fails 8.2 AMD64 o amd64/167543 amd64 [kernel] Install FreeBSD can show error message with c o amd64/167393 amd64 [boot] MacBook4,1 hangs on SMP boot o amd64/166639 amd64 [boot] Syscons issue Intel D2700 o amd64/166229 amd64 [boot] Unable to install FreeBSD 9 on Acer Extensa 522 o amd64/165850 amd64 [build] 8.3-RC1 (amd64): world doesn't build with CPUT o amd64/165845 amd64 [build] Unable to build kernel on 8.2-STABLE o amd64/165351 amd64 [boot] Error while installing or booting the freeBSD O o amd64/164773 amd64 [boot] 9.0 amd64 fails to boot on HP DL145 G3 [regress o amd64/164707 amd64 FreeBSD 9 installer does not work with IBM uefi o amd64/164643 amd64 Kernel Panic at 9.0-RELEASE o amd64/164619 amd64 when logged in as root the user and group applications o amd64/164457 amd64 [install] Can't install FreeBSD 9.0 (amd64) on HP Blad o amd64/164301 amd64 [install] 9.0 - Can't install, no DHCP lease o amd64/164136 amd64 after fresh install 8.1 release or 8.2 release the har o amd64/164116 amd64 [boot] FreeBSD 9.0-RELEASE installations mediums fails o amd64/164089 amd64 FreeBSD-9.0-RELEASE-amd64-memstick.img does not boot o amd64/164073 amd64 /etc/rc warning after booting o amd64/164036 amd64 [keyboard] Moused fails on 9_0_RELENG o amd64/163736 amd64 Freebsd 8.2 with MPD5 and about 100 PPPoE clients pani o amd64/163710 amd64 setjump in userboot.so causes stack corruption o amd64/163625 amd64 Install problems of RC3 amd64 on ASRock N68 GE3 UCC o amd64/163568 amd64 hard drive naming o amd64/163285 amd64 when installing gnome2-lite not all dependent packages o amd64/163284 amd64 print manager failed to install correctly o amd64/163114 amd64 no boot on Via Nanao netbook Samsung NC20 o amd64/163092 amd64 FreeBSD 9.0-RC2 fails to boot from raid-z2 if AHCI is o amd64/163048 amd64 normal user cant mount ntfs-3g o amd64/162936 amd64 fails boot and destabilizes other OSes on FreeBSD 9 RC o amd64/162489 amd64 After some time X blanks the screen and does not respo o amd64/162314 amd64 not able to install FreeBSD-8.2-RELEASE-amd64-dvd1 as o amd64/162219 amd64 [REGRESSION] In KDE 4.7.2 cant enable OpenGL,in 4.6.5 o amd64/162170 amd64 Unable to install due to freeze at "run_interrupt_driv o amd64/161974 amd64 FreeBSD 9 new installer installs succesful, renders ma o kern/160833 amd64 Keyboard USB doesn't work o amd64/157386 amd64 [powerd] Enabling powerd(8) with default settings on I o amd64/156106 amd64 [boot] boot0 fails to start o amd64/155135 amd64 [boot] Does Not Boot On a Very Standard Hardware o amd64/154957 amd64 [boot] Install boot CD won't boot up - keeps rebooting o amd64/154629 amd64 [panic] Fatal trap 9: general protection fault while i o amd64/153935 amd64 [hang] system hangs while trying to do 'shutdown -h no o amd64/153831 amd64 [boot] CD bootloader won't on Tyan s2912G2nr o amd64/153496 amd64 [hyper-v] [install] Install on Hyper-V leaves corrupt o amd64/153372 amd64 [panic] kernel panic o amd64/153175 amd64 [amd64] Kernel Panic on only FreeBSD 8 amd64 o amd64/152874 amd64 [install] 8.1 install fails where 7.3 works due to lac o amd64/152430 amd64 [boot] HP ProLiant Microserver n36l cannot boot into i o amd64/145991 amd64 [NOTES] [patch] Add a requires line to /sys/amd64/conf o amd64/144405 amd64 [build] [patch] include /usr/obj/lib32 in cleanworld t s amd64/143173 amd64 [ata] Promise FastTrack TX4 + SATA DVD, installer can' p amd64/141413 amd64 [hang] Tyan 2881 m3289 SMDC freeze o amd64/137942 amd64 [pci] 8.0-BETA2 having problems with Asus M2N-SLI-delu o amd64/127640 amd64 [amd64] gcc(1) will not build shared libraries with -f o amd64/115194 amd64 LCD screen remains blank after Dell XPS M1210 lid is c 71 problems total. From owner-freebsd-amd64@FreeBSD.ORG Tue Oct 30 15:13:36 2012 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8452F671; Tue, 30 Oct 2012 15:13:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kostikbel-1-pt.tunnel.tserv11.ams1.ipv6.he.net [IPv6:2001:470:1f14:13d6::2]) by mx1.freebsd.org (Postfix) with ESMTP id A13548FC0C; Tue, 30 Oct 2012 15:13:34 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id q9UFDRdb087336; Tue, 30 Oct 2012 17:13:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id q9UFDRiG087335; Tue, 30 Oct 2012 17:13:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 30 Oct 2012 17:13:27 +0200 From: Konstantin Belousov To: amd64@freebsd.org, current@freebsd.org Subject: Re: Small Ivy features: FSGSBASE and SMEP. Message-ID: <20121030151327.GW73505@kib.kiev.ua> References: <20120908181019.GK33100@deviant.kiev.zoral.com.ua> <504C3A5D.4020402@fuckner.net> <20120909110255.GM33100@deviant.kiev.zoral.com.ua> <20120909202905.GP33100@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MUnXZt0Uv08c1hBe" Content-Disposition: inline In-Reply-To: <20120909202905.GP33100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: avg@freebsd.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 15:13:36 -0000 --MUnXZt0Uv08c1hBe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 09, 2012 at 11:29:05PM +0300, Konstantin Belousov wrote: > On Sun, Sep 09, 2012 at 02:02:55PM +0300, Konstantin Belousov wrote: > > On Sun, Sep 09, 2012 at 08:42:37AM +0200, Michael Fuckner wrote: > > > Hi all, > > >=20 > > > I changed your patch slightly to apply to specialreh.h on STABLE > > >=20 > > > root@c64:/root # diff smep.1.patch.bak smep.1.patch > > > 80c80 > > > < diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/special= reg.h > > > --- > > > > diff --git a/sys/amd64/include/specialreg.h=20 > > > b/sys/amd64/include/specialreg.h > > > 82,83c82,83 > > > < --- a/sys/x86/include/specialreg.h > > > < +++ b/sys/x86/include/specialreg.h > > > --- > > > > --- a/sys/amd64/include/specialreg.h > > > > +++ b/sys/amd64/include/specialreg.h > > >=20 > > > I got a new kernel, but it is stuck immediately (kerneltrap 9 with=20 > > > interrupts disabled), system doesn't boot on E3-1230 V2 on Supermicro= =20 > > > X9SCM-IIF > > >=20 > > > Anything else I could check? > > I need the backtrace and the whole kernel messages. > At least, there was a typo in the definition of CR4_FSGSBASE. > I still need verbose dmesg and panic messages, if any, with the > http://people.freebsd.org/~kib/misc/smep.2.patch=20 > version of the patch. >=20 With a help from Andrey, who has access to the hardware supporting SMEP, I fixed the issue with double-fault on SMEP enable. The issue was due to loader(8) making a handoff to the kernel with 1GB identity mapping which has the PG_U bit set. As a result, after enabling the CR4.SMEP, the #pf was generated immediately. But since the handler, if any, is also mapped with PG_U, double-fault happen and machine was reset. Updated patch, also fixing other minor problems with the features display, is at http://people.freebsd.org/~kib/misc/smep.3.patch . Please test. > >=20 > > >=20 > > > Regards, > > > Michael! > > >=20 > > >=20 > > > On 09/08/2012 08:10 PM, Konstantin Belousov wrote: > > > >Please find at > > > >http://people.freebsd.org/~kib/misc/smep.1.patch > > > >the patch which should enable the FSGSBASE and SMEP features > > > >supposedly present in the IvyBridge CPUs. > > > > > > > >FSGSBASE are four new instructions available in the 64bit mode only. > > > >They allow to access bases for %fs and %gs without touching MSRs. > > > >This makes it possible to both read and write bases in the user mode, > > > >or in ring 0 with lower overhead. > > > > > > > >At the moment, WRFSBASE/WRGSBASE instructions should work, but are > > > >useless since any interrupt or context switch overrides bases with t= he > > > >values set by the arch syscall. Still, RDFSBASE/RDGSBASE might be us= eful > > > >for some code and I see no reason not to enable them. > > > > > > > >SMEP is the nice feature of the processor which makes it trap if ring > > > >0 tries to execute an instruction from usermode-accessible page. It = is > > > >another mitigation for things like calling user-controllable function > > > >pointer in kernel, as well as a protection for NULL function pointer > > > >dereference. > > > > > > > >I am sure that we never execute anything in kernel from user page, b= ut > > > >I did not tested the patch since I have no Ivy machine. > > > > > > > >I need your reports about boot on Ivy with patch applied. Please inc= lude > > > >the lines from verbose dmesg with CPU Features. In particular, the > > > >'Standard Extended Features' report should appear in output. > > > > > > > >Thanks. > > > > >=20 >=20 --MUnXZt0Uv08c1hBe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCP7pYACgkQC3+MBN1Mb4i4XgCeMbWPn1gy9FTlpXgomSgRMzlm JRsAoNo07WO49h+wnpyaOHBAO9d0Fb0T =0ClT -----END PGP SIGNATURE----- --MUnXZt0Uv08c1hBe-- From owner-freebsd-amd64@FreeBSD.ORG Wed Oct 31 10:50:01 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2C9447F for ; Wed, 31 Oct 2012 10:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 848628FC0A for ; Wed, 31 Oct 2012 10:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9VAo1vO015203 for ; Wed, 31 Oct 2012 10:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9VAo17R015202; Wed, 31 Oct 2012 10:50:01 GMT (envelope-from gnats) Resent-Date: Wed, 31 Oct 2012 10:50:01 GMT Resent-Message-Id: <201210311050.q9VAo17R015202@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tommy Sonne Alstrøm Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1BCB346 for ; Wed, 31 Oct 2012 10:44:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id D7E478FC0C for ; Wed, 31 Oct 2012 10:44:06 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9VAi6vk079724 for ; Wed, 31 Oct 2012 10:44:06 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9VAi67w079723; Wed, 31 Oct 2012 10:44:06 GMT (envelope-from nobody) Message-Id: <201210311044.q9VAi67w079723@red.freebsd.org> Date: Wed, 31 Oct 2012 10:44:06 GMT From: Tommy Sonne Alstrøm To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode X-Mailman-Approved-At: Wed, 31 Oct 2012 11:02:14 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 10:50:01 -0000 >Number: 173235 >Category: amd64 >Synopsis: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 31 10:50:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Tommy Sonne Alstrøm >Release: Freebsd 9.0 >Organization: personal use >Environment: FreeBSD ophelia.anakin.ws 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I've been running freebsd for about 40 days now on the machine in question without any issues. Yesterday I was migrating apache+mysql data and when I was done I decided to run a zpool scrub (using ZFS raidz). I'm starting to do this and then after about 30 seconds I loose the connection to my machine. When I got home I find the machine is hanging and it needs to be powered off. The text on the screen is a kernel panic with some call stack (I took a picture). After a power-off the system was able to reboot but gave a new kernel panic, this time with a dump. The system rebooted and made a crash dump and was able to reboot into some kind of save mode. This is what I got: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x20 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff80876af8 stack pointer = 0x28:0xffffff8451ab29e0 frame pointer = 0x28:0xffffff8451ab2a10 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = resume, IOPL = 0 current process = 1192 (smbiod1) trap number = 12 panic: page fault cpuid = 0 KDB: stack backtrace: #0 0xffffffff808680fe at kdb_backtrace+0x5e #1 0xffffffff80832cb7 at panic+0x187 #2 0xffffffff80b185a0 at trap_fatal+0x290 #3 0xffffffff80b18c57 at trap+0x287 #4 0xffffffff80b0324f at calltrap+0x8 #5 0xffffffff80822d50 at _mtx_unlock_sleep+0x50 #6 0xffffffff8185a50c at smb_iod_invrq+0xbc #7 0xffffffff8185b621 at smb_iod_addrq+0x211 #8 0xffffffff81857fd9 at smb_rq_simple+0x39 #9 0xffffffff8185689e at smb_smb_ssnsetup+0x17e #10 0xffffffff8185a68f at smb_iod_connect+0x11f #11 0xffffffff8185b0e0 at smb_iod_thread+0x1d0 #12 0xffffffff8080682f at fork_exit+0x11f #13 0xffffffff80b0377e at fork_trampoline+0xe Uptime: 40s Dumping 816 out of 16088 MB:..2%..12%..22%..32%..42%..51%..61%..71%..81%..91% Here the zpool scrub managed to finish without errors. Then I rebooted and everything worked fine. This morning again I've discovered that there was another crash. Again this is what I got: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x20 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff80876af8 stack pointer = 0x28:0xffffff8451ab29e0 frame pointer = 0x28:0xffffff8451ab2a10 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = resume, IOPL = 0 current process = 1192 (smbiod1) trap number = 12 panic: page fault cpuid = 0 KDB: stack backtrace: #0 0xffffffff808680fe at kdb_backtrace+0x5e #1 0xffffffff80832cb7 at panic+0x187 #2 0xffffffff80b185a0 at trap_fatal+0x290 #3 0xffffffff80b18c57 at trap+0x287 #4 0xffffffff80b0324f at calltrap+0x8 #5 0xffffffff80822d50 at _mtx_unlock_sleep+0x50 #6 0xffffffff8185a50c at smb_iod_invrq+0xbc #7 0xffffffff8185b621 at smb_iod_addrq+0x211 #8 0xffffffff81857fd9 at smb_rq_simple+0x39 #9 0xffffffff8185689e at smb_smb_ssnsetup+0x17e #10 0xffffffff8185a68f at smb_iod_connect+0x11f #11 0xffffffff8185b0e0 at smb_iod_thread+0x1d0 #12 0xffffffff8080682f at fork_exit+0x11f #13 0xffffffff80b0377e at fork_trampoline+0xe Uptime: 40s Dumping 816 out of 16088 MB:..2%..12%..22%..32%..42%..51%..61%..71%..81%..91% I use an Intel Server MB with CRC memory so these errors should not occur, but maybe this is a result of faulty memory ? In that case, how can I exclude that? I've read http://www.freebsd.org/doc/faq/troubleshoot.html#trap-12-panic and http://www.freebsd.org/doc/faq/advanced.html#kernel-panic-troubleshooting But since there is these core files I'm thinking maybe the dump is already there ? Thanks in advance! >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-amd64@FreeBSD.ORG Wed Oct 31 12:40:01 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAA8416B for ; Wed, 31 Oct 2012 12:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4238FC0A for ; Wed, 31 Oct 2012 12:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9VCe1eq024698 for ; Wed, 31 Oct 2012 12:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9VCe1R4024697; Wed, 31 Oct 2012 12:40:01 GMT (envelope-from gnats) Date: Wed, 31 Oct 2012 12:40:01 GMT Message-Id: <201210311240.q9VCe1R4024697@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org Cc: From: =?ISO-8859-1?Q?Tommy_Sonne_Alstr=F8m?= Subject: Re: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode X-Mailman-Approved-At: Wed, 31 Oct 2012 13:04:22 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: =?ISO-8859-1?Q?Tommy_Sonne_Alstr=F8m?= List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 12:40:01 -0000 The following reply was made to PR amd64/173235; it has been noted by GNATS. From: =?ISO-8859-1?Q?Tommy_Sonne_Alstr=F8m?= To: Andriy Gapon Cc: bug-followup@FreeBSD.org Subject: Re: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode Date: Wed, 31 Oct 2012 13:35:35 +0100 Thanks for the answer. Please note, that I had no network shares mounted when the 2nd crash occurred. Sorry if I chose the wrong category. BR Tommy On 10/31/2012 01:31 PM, Andriy Gapon wrote: > This looks like an smbfs/netsmb related bug. > > P.S. There was no reason to chose 'amd64' category. From owner-freebsd-amd64@FreeBSD.ORG Wed Oct 31 12:40:02 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8501816C for ; Wed, 31 Oct 2012 12:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6B42E8FC0C for ; Wed, 31 Oct 2012 12:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9VCe2w0024704 for ; Wed, 31 Oct 2012 12:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9VCe2xo024703; Wed, 31 Oct 2012 12:40:02 GMT (envelope-from gnats) Date: Wed, 31 Oct 2012 12:40:02 GMT Message-Id: <201210311240.q9VCe2xo024703@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org Cc: From: Andriy Gapon Subject: Re: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode X-Mailman-Approved-At: Wed, 31 Oct 2012 13:04:30 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Andriy Gapon List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 12:40:02 -0000 The following reply was made to PR amd64/173235; it has been noted by GNATS. From: Andriy Gapon To: bug-followup@FreeBSD.org, tommy@anakin.ws Cc: Subject: Re: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode Date: Wed, 31 Oct 2012 14:31:15 +0200 This looks like an smbfs/netsmb related bug. P.S. There was no reason to chose 'amd64' category. -- Andriy Gapon From owner-freebsd-amd64@FreeBSD.ORG Wed Oct 31 12:50:02 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D674608 for ; Wed, 31 Oct 2012 12:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id ECF678FC16 for ; Wed, 31 Oct 2012 12:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9VCo1am025050 for ; Wed, 31 Oct 2012 12:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9VCo1Wx025049; Wed, 31 Oct 2012 12:50:01 GMT (envelope-from gnats) Date: Wed, 31 Oct 2012 12:50:01 GMT Message-Id: <201210311250.q9VCo1Wx025049@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org Cc: From: =?ISO-8859-1?Q?Tommy_Sonne_Alstr=F8m?= Subject: Re: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode X-Mailman-Approved-At: Wed, 31 Oct 2012 13:10:02 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: =?ISO-8859-1?Q?Tommy_Sonne_Alstr=F8m?= List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 12:50:02 -0000 The following reply was made to PR amd64/173235; it has been noted by GNATS. From: =?ISO-8859-1?Q?Tommy_Sonne_Alstr=F8m?= To: Andriy Gapon Cc: bug-followup@FreeBSD.org Subject: Re: amd64/173235: Have received two crashes within 1 day after installing new packages: Fatal trap 12: page fault in kernel mode Date: Wed, 31 Oct 2012 13:44:01 +0100 I'm very sorry, I just realized that I copied the 1st readout twice. The 2nd readout was like this Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x6 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff809da0cc stack pointer = 0x28:0xffffff8451f549b0 frame pointer = 0x28:0xffffff8451f54a40 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1068 (named) trap number = 12 panic: page fault cpuid = 0 KDB: stack backtrace: #0 0xffffffff808680fe at kdb_backtrace+0x5e #1 0xffffffff80832cb7 at panic+0x187 #2 0xffffffff80b185a0 at trap_fatal+0x290 #3 0xffffffff80b188e9 at trap_pfault+0x1f9 #4 0xffffffff80b18daf at trap+0x3df #5 0xffffffff80b0324f at calltrap+0x8 #6 0xffffffff809f75a7 at udp6_bind+0xa7 #7 0xffffffff808a152e at kern_bind+0xde #8 0xffffffff808a15a1 at sys_bind+0x41 #9 0xffffffff80b17e90 at amd64_syscall+0x4e0 #10 0xffffffff80b03537 at Xfast_syscall+0xf7 Uptime: 9h41m13s Dumping 3411 out of 16088 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% On 10/31/2012 01:35 PM, Tommy Sonne Alstrøm wrote: > Thanks for the answer. > > Please note, that I had no network shares mounted when the 2nd crash > occurred. > > Sorry if I chose the wrong category. > > BR Tommy > > On 10/31/2012 01:31 PM, Andriy Gapon wrote: >> This looks like an smbfs/netsmb related bug. >> >> P.S. There was no reason to chose 'amd64' category. > From owner-freebsd-amd64@FreeBSD.ORG Fri Nov 2 00:08:00 2012 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BBEB3C8; Fri, 2 Nov 2012 00:08:00 +0000 (UTC) (envelope-from kpersson@clarkebroadcasting.com) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe003.messaging.microsoft.com [65.55.88.13]) by mx1.freebsd.org (Postfix) with ESMTP id C73B28FC0C; Fri, 2 Nov 2012 00:07:59 +0000 (UTC) Received: from mail163-tx2-R.bigfish.com (10.9.14.237) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 14.1.225.23; Fri, 2 Nov 2012 00:07:53 +0000 Received: from mail163-tx2 (localhost [127.0.0.1]) by mail163-tx2-R.bigfish.com (Postfix) with ESMTP id E915B1E0146; Fri, 2 Nov 2012 00:07:52 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.236.101; KIP:(null); UIP:(null); IPV:NLI; H:BY2PRD0510HT001.namprd05.prod.outlook.com; RD:none; EFVD:NLI X-SpamScore: -5 X-BigFish: PS-5(zzbb2dI98dI9371I1432I14ffIzz1de0h1202h1d1ah1d2ahzz17326ah8275dhz2fh2a8h668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh1155h) Received-SPF: pass (mail163-tx2: domain of clarkebroadcasting.com designates 157.56.236.101 as permitted sender) client-ip=157.56.236.101; envelope-from=kpersson@clarkebroadcasting.com; helo=BY2PRD0510HT001.namprd05.prod.outlook.com ; .outlook.com ; Received: from mail163-tx2 (localhost.localdomain [127.0.0.1]) by mail163-tx2 (MessageSwitch) id 1351814870864109_3051; Fri, 2 Nov 2012 00:07:50 +0000 (UTC) Received: from TX2EHSMHS015.bigfish.com (unknown [10.9.14.237]) by mail163-tx2.bigfish.com (Postfix) with ESMTP id CDDE1220045; Fri, 2 Nov 2012 00:07:50 +0000 (UTC) Received: from BY2PRD0510HT001.namprd05.prod.outlook.com (157.56.236.101) by TX2EHSMHS015.bigfish.com (10.9.99.115) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 2 Nov 2012 00:07:50 +0000 Received: from BY2PRD0510MB376.namprd05.prod.outlook.com ([169.254.7.85]) by BY2PRD0510HT001.namprd05.prod.outlook.com ([10.255.84.36]) with mapi id 14.16.0233.002; Fri, 2 Nov 2012 00:07:50 +0000 From: Kristofer Persson To: Konstantin Belousov , "amd64@freebsd.org" , "current@freebsd.org" Subject: RE: Small Ivy features: FSGSBASE and SMEP. Thread-Topic: Small Ivy features: FSGSBASE and SMEP. Thread-Index: AQHNuFn+wj3ytlEm00S+444R+sVIpZfVq3Gv Date: Fri, 2 Nov 2012 00:07:46 +0000 Message-ID: References: <20120908181019.GK33100@deviant.kiev.zoral.com.ua> <504C3A5D.4020402@fuckner.net> <20120909110255.GM33100@deviant.kiev.zoral.com.ua> <20120909202905.GP33100@deviant.kiev.zoral.com.ua>, <20121030151327.GW73505@kib.kiev.ua> In-Reply-To: <20121030151327.GW73505@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [216.86.189.249] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: clarkebroadcasting.com Cc: "avg@freebsd.org" X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 00:08:00 -0000 $70.00 ________________________________________ From: owner-freebsd-amd64@freebsd.org [owner-freebsd-amd64@freebsd.org] on = behalf of Konstantin Belousov [kostikbel@gmail.com] Sent: Tuesday, October 30, 2012 8:13 AM To: amd64@freebsd.org; current@freebsd.org Cc: avg@freebsd.org Subject: Re: Small Ivy features: FSGSBASE and SMEP. On Sun, Sep 09, 2012 at 11:29:05PM +0300, Konstantin Belousov wrote: > On Sun, Sep 09, 2012 at 02:02:55PM +0300, Konstantin Belousov wrote: > > On Sun, Sep 09, 2012 at 08:42:37AM +0200, Michael Fuckner wrote: > > > Hi all, > > > > > > I changed your patch slightly to apply to specialreh.h on STABLE > > > > > > root@c64:/root # diff smep.1.patch.bak smep.1.patch > > > 80c80 > > > < diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/special= reg.h > > > --- > > > > diff --git a/sys/amd64/include/specialreg.h > > > b/sys/amd64/include/specialreg.h > > > 82,83c82,83 > > > < --- a/sys/x86/include/specialreg.h > > > < +++ b/sys/x86/include/specialreg.h > > > --- > > > > --- a/sys/amd64/include/specialreg.h > > > > +++ b/sys/amd64/include/specialreg.h > > > > > > I got a new kernel, but it is stuck immediately (kerneltrap 9 with > > > interrupts disabled), system doesn't boot on E3-1230 V2 on Supermicro > > > X9SCM-IIF > > > > > > Anything else I could check? > > I need the backtrace and the whole kernel messages. > At least, there was a typo in the definition of CR4_FSGSBASE. > I still need verbose dmesg and panic messages, if any, with the > http://people.freebsd.org/~kib/misc/smep.2.patch > version of the patch. > With a help from Andrey, who has access to the hardware supporting SMEP, I fixed the issue with double-fault on SMEP enable. The issue was due to loader(8) making a handoff to the kernel with 1GB identity mapping which has the PG_U bit set. As a result, after enabling the CR4.SMEP, the #pf was generated immediately. But since the handler, if any, is also mapped with PG_U, double-fault happen and machine was reset. Updated patch, also fixing other minor problems with the features display, is at http://people.freebsd.org/~kib/misc/smep.3.patch . Please test. > > > > > > > > Regards, > > > Michael! > > > > > > > > > On 09/08/2012 08:10 PM, Konstantin Belousov wrote: > > > >Please find at > > > >http://people.freebsd.org/~kib/misc/smep.1.patch > > > >the patch which should enable the FSGSBASE and SMEP features > > > >supposedly present in the IvyBridge CPUs. > > > > > > > >FSGSBASE are four new instructions available in the 64bit mode only. > > > >They allow to access bases for %fs and %gs without touching MSRs. > > > >This makes it possible to both read and write bases in the user mode= , > > > >or in ring 0 with lower overhead. > > > > > > > >At the moment, WRFSBASE/WRGSBASE instructions should work, but are > > > >useless since any interrupt or context switch overrides bases with t= he > > > >values set by the arch syscall. Still, RDFSBASE/RDGSBASE might be us= eful > > > >for some code and I see no reason not to enable them. > > > > > > > >SMEP is the nice feature of the processor which makes it trap if rin= g > > > >0 tries to execute an instruction from usermode-accessible page. It = is > > > >another mitigation for things like calling user-controllable functio= n > > > >pointer in kernel, as well as a protection for NULL function pointer > > > >dereference. > > > > > > > >I am sure that we never execute anything in kernel from user page, b= ut > > > >I did not tested the patch since I have no Ivy machine. > > > > > > > >I need your reports about boot on Ivy with patch applied. Please inc= lude > > > >the lines from verbose dmesg with CPU Features. In particular, the > > > >'Standard Extended Features' report should appear in output. > > > > > > > >Thanks. > > > > > >= From owner-freebsd-amd64@FreeBSD.ORG Fri Nov 2 08:25:39 2012 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4964EE30; Fri, 2 Nov 2012 08:25:39 +0000 (UTC) (envelope-from michael@fuckner.net) Received: from mo6-p00-ob.rzone.de (mo6-p00-ob.rzone.de [IPv6:2a01:238:20a:202:5300::1]) by mx1.freebsd.org (Postfix) with ESMTP id A04FC8FC08; Fri, 2 Nov 2012 08:25:38 +0000 (UTC) X-RZG-AUTH: :IWUHfUGtd9+6EujMWHx57N4dWae4bmTL/JIGbzkGUoozgkO4q1xDEhkgOJDsXNs= X-RZG-CLASS-ID: mo00 Received: from fuckner2.delnet ([85.183.0.195]) by smtp.strato.de (joses mo42) (RZmta 30.21 AUTH) with ESMTPA id J00d2eoA285F7w ; Fri, 2 Nov 2012 09:25:36 +0100 (CET) Message-ID: <509382A4.8020903@fuckner.net> Date: Fri, 02 Nov 2012 09:21:56 +0100 From: Michael Fuckner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: freebsd-amd64@freebsd.org, current@freebsd.org, kostikbel@gmail.com Subject: Re: Small Ivy features: FSGSBASE and SMEP. References: <20120908181019.GK33100@deviant.kiev.zoral.com.ua> <504C3A5D.4020402@fuckner.net> <20120909110255.GM33100@deviant.kiev.zoral.com.ua> <20120909202905.GP33100@deviant.kiev.zoral.com.ua> <20121030151327.GW73505@kib.kiev.ua> In-Reply-To: <20121030151327.GW73505@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 08:25:39 -0000 > is at http://people.freebsd.org/~kib/misc/smep.3.patch . > > Please test. looks good (after changing the location of specialreg.h (on STABLE) do you need any output or something like that? Regards, Michael! From owner-freebsd-amd64@FreeBSD.ORG Fri Nov 2 12:32:18 2012 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23AD4339; Fri, 2 Nov 2012 12:32:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kostikbel-1-pt.tunnel.tserv11.ams1.ipv6.he.net [IPv6:2001:470:1f14:13d6::2]) by mx1.freebsd.org (Postfix) with ESMTP id 997288FC0A; Fri, 2 Nov 2012 12:32:17 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qA2CW9FN032471; Fri, 2 Nov 2012 14:32:09 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qA2CW9SI032470; Fri, 2 Nov 2012 14:32:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 2 Nov 2012 14:32:09 +0200 From: Konstantin Belousov To: Michael Fuckner Subject: Re: Small Ivy features: FSGSBASE and SMEP. Message-ID: <20121102123209.GV73505@kib.kiev.ua> References: <20120908181019.GK33100@deviant.kiev.zoral.com.ua> <504C3A5D.4020402@fuckner.net> <20120909110255.GM33100@deviant.kiev.zoral.com.ua> <20120909202905.GP33100@deviant.kiev.zoral.com.ua> <20121030151327.GW73505@kib.kiev.ua> <509382A4.8020903@fuckner.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m02j6EnzJ5dgRysN" Content-Disposition: inline In-Reply-To: <509382A4.8020903@fuckner.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: current@freebsd.org, freebsd-amd64@freebsd.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 12:32:18 -0000 --m02j6EnzJ5dgRysN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 02, 2012 at 09:21:56AM +0100, Michael Fuckner wrote: >=20 > > is at http://people.freebsd.org/~kib/misc/smep.3.patch . > > > > Please test. >=20 > looks good (after changing the location of specialreg.h (on STABLE) >=20 > do you need any output or something like that? No, thank you, I do not need anything, assuming you machine booted and operates fine. Patch was already committed to HEAD, r242432 + r242433. --m02j6EnzJ5dgRysN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCTvUkACgkQC3+MBN1Mb4jzCQCeIqkrVDxujq0u22nOCBu078yY qBEAoKIQZTvBXYmllg5uBS8a1UlgvG7K =LJqv -----END PGP SIGNATURE----- --m02j6EnzJ5dgRysN--