From owner-svn-src-head@freebsd.org Wed Feb 15 21:22:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76D45CE0EA4 for ; Wed, 15 Feb 2017 21:22:47 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-73.reflexion.net [208.70.210.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165301F13 for ; Wed, 15 Feb 2017 21:22:46 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 25615 invoked from network); 15 Feb 2017 21:22:38 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 15 Feb 2017 21:22:38 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.30.0) with SMTP; Wed, 15 Feb 2017 16:22:38 -0500 (EST) Received: (qmail 22297 invoked from network); 15 Feb 2017 21:22:38 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 15 Feb 2017 21:22:38 -0000 Received: from [192.168.1.111] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id 0B38EEC788F; Wed, 15 Feb 2017 13:22:38 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313772 - head/sys/arm64/arm64 Message-Id: <62A5F129-EFD3-496B-854C-9D8623EFFD38@dsl-only.net> Date: Wed, 15 Feb 2017 13:22:37 -0800 To: Andrew Turner , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 21:22:47 -0000 > Author: andrew > Date: Wed Feb 15 14:56:47 2017 > New Revision: 313772 > URL:=20 > https://svnweb.freebsd.org/changeset/base/313772 >=20 > Log: > Load the new sp_el0 with interrupts disabled in fork_trampoline. If = an > interrupt arrives in fork_trampoline after sp_el0 was written we may = then > switch to a new thread, enter userland so change this stack pointer, = then > return to this code with the wrong value. This fixes this case by = moving > the load of sp_el0 until after interrupts have been disabled. = https://svnweb.freebsd.org/base/stable/11/sys/arm64/arm64/swtch.S?revision= =3D302408&view=3Dmarkup shows stable/11 has the same issue. Is this to be MFC'd at some point? stable/10 seems to have a different code structure: https://svnweb.freebsd.org/base/stable/10/sys/amd64/amd64/ does not list swtch.S . So I'm unsure about its status for fork returning to the child process and its handling of the stack pointer to be restored. =3D=3D=3D Mark Millard markmi at dsl-only.net