From owner-svn-src-head@freebsd.org Wed Feb 15 21:39:35 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 DFD54CDF2B1 for ; Wed, 15 Feb 2017 21:39:35 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-vk0-x229.google.com (mail-vk0-x229.google.com [IPv6:2607:f8b0:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B127926 for ; Wed, 15 Feb 2017 21:39:35 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-vk0-x229.google.com with SMTP id r136so107681197vke.1 for ; Wed, 15 Feb 2017 13:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=chyB1sCUH1qLYfxTiIqOVbaJx+Wc845ByTKvMiDjAXg=; b=Zu2bgM22UMBwliRrz3KoHiuGrP8f+qn/TkvSVgvYb8teZcBsqP5LFwuvQug/zWDp32 cVcXec0bRvV29s0cIjCddWEHP5HCleNtiG1JcENF99vqMn5Ic5nJ68lYjItwLYtlsgvu mzlN3SCW7gwrGmiBcVoMfrRFgYKjkyWeCT+dRLqBw7Mj+afRMLL/E9BQ2FIPWwqXgtAc Xw5zntn5I5WdEh1YFRLm4RhkFAkz3aRPm2CNuRJ1N2umfUHTkqhP2kzYLtfKeRRhv4Ex T+3HMRjVIO2ZMepQsyil1vGizEfYMKkC83onHgZUPRVfD4vMCyCf2a1+RiQ8JiJQ4hCO /Tvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=chyB1sCUH1qLYfxTiIqOVbaJx+Wc845ByTKvMiDjAXg=; b=pi7kkOkXfzwZNMsUwkcbsXui6G1qVCLxWKumdURuSYmQ69Z+wZzqiXsWtV6BEGAW5u rvJ206mZksfcS4MbseeYjgCYsiH+Tk96lr84C4HO9XuzkckfrJKWO4EVXRQEGQLfQdA8 hrbF/wFJoArVA5L7U9YrWaYgKchuLEkg50UYcHpmM2cQ/ntozTvubKuAAG/4dndYbbal raUy5WpMAKzKUTBMtUZEMOv/sLCcgLTTw9WkOvFluiqZu/32B9YwKBHIwbmiSVXbtEYv WkPnGoHEOtsAyZqgfPoFjKgs/3YjvwgbCAwvlm34ZkzJUd0GsiH5lpcylHC9xnUV3JyC 2mhQ== X-Gm-Message-State: AMke39naOfSK+XwH8tUxWSmZGGcBrERfr3DcqtG7BgjVww0hv1G2G0+N+SDkv3dfxl6hEeh8QxO0XpicgPy3PI1N X-Received: by 10.31.220.5 with SMTP id t5mr18334127vkg.39.1487194774571; Wed, 15 Feb 2017 13:39:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.45.2 with HTTP; Wed, 15 Feb 2017 13:39:34 -0800 (PST) In-Reply-To: <62A5F129-EFD3-496B-854C-9D8623EFFD38@dsl-only.net> References: <62A5F129-EFD3-496B-854C-9D8623EFFD38@dsl-only.net> From: Oliver Pinter Date: Wed, 15 Feb 2017 22:39:34 +0100 Message-ID: Subject: Re: svn commit: r313772 - head/sys/arm64/arm64 To: Mark Millard Cc: Andrew Turner , svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 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:39:36 -0000 On 2/15/17, Mark Millard wrote: >> Author: andrew >> Date: Wed Feb 15 14:56:47 2017 >> New Revision: 313772 >> URL: >> https://svnweb.freebsd.org/changeset/base/313772 >> >> 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=302408&view=markup > > 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/ This is x86-64 aka amd64 in FreeBSD, in 10-STABLE only 32 bit ARM support exists, so there isn't arm64. > > 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. > > === > Mark Millard > markmi at dsl-only.net > > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >