From owner-freebsd-arm@freebsd.org Sun Mar 19 14:18:27 2017 Return-Path: Delivered-To: freebsd-arm@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 1EEB6D13846 for ; Sun, 19 Mar 2017 14:18:27 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) (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 D4FAA1ADF for ; Sun, 19 Mar 2017 14:18:26 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qt0-x22a.google.com with SMTP id x35so91064555qtc.2 for ; Sun, 19 Mar 2017 07:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=jfOnfT72aRznkZEfZDJ12N6sLVea77FdGWDYoUSn4yo=; b=Dz3av2c+FbU8pEblWImjRXNN+hZWF4PleHEyGiVEpvkoF10l9nIm7N5fWWWMdvbewE C07QskqDZXZ22ydRR+orYrhunBmrB7ylD9c/qAV1pHKbA55SW0xTrrG4zMgB+/duDdRc tMs9BG9xV+1w0dQj0v3s3Eehiu9cLoTNQMzQY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=jfOnfT72aRznkZEfZDJ12N6sLVea77FdGWDYoUSn4yo=; b=FVBLWfCCFAVxzuX6QQDkz5jFyOu8YerFRWvM+z6WRTxY9A8Kh5hs28548HH15/TmbG +IYhBLsA29jsb6cKByE+o083YNd4K422Ak4xKLpP9gsWxmTkZlF/nZ7iACpeiF/URs67 ioF8Adkm4Rwjm9z4bEAncxL4fEiMkRB8ce4YMm/wLuqT/vaDBpi5M7sqMllUmlPyvNkj jZgRjJPE105mGggfayPlzuBvFYy0le6Ep/O7nO+8kjw7tHXzxSXaxMmBxUGtZ3Yo+KY3 4heS+LApxelirOpT7rjknC9Zevi/AaVrlHyufpoKckuF1U8kFqfdsZADp6onTwmlum0u T7Uw== X-Gm-Message-State: AFeK/H3k41qW/b4v6QmjmVxGIXB78umYlJS5HhkF4lb/EyYeLNo9swbVMRKD7AMt4ITeKQ== X-Received: by 10.200.54.46 with SMTP id m43mr25381289qtb.127.1489933105427; Sun, 19 Mar 2017 07:18:25 -0700 (PDT) Received: from [192.168.0.11] ([186.236.217.98]) by smtp.googlemail.com with ESMTPSA id y33sm10367959qta.27.2017.03.19.07.18.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Mar 2017 07:18:24 -0700 (PDT) Subject: Re: A potential fix for arm64's: sh`forkshell child-process path after fork sometimes has a bad stack pointer value To: freebsd-arm@freebsd.org References: <2D04FF37-DEC8-42CE-961D-AE8CD58A0EAA@dsl-only.net> <93064627-5F72-4167-90B1-0A98ABF4C99C@dsl-only.net> <3BC697B9-4A3E-49FF-AB11-1106E2EF8399@dsl-only.net> From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: Date: Sun, 19 Mar 2017 11:18:12 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <3BC697B9-4A3E-49FF-AB11-1106E2EF8399@dsl-only.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Mar 2017 14:18:27 -0000 Em 14/02/2017 13:35, Mark Millard escreveu: > The following change has let my test run for 8.5 hours so far without a > fork-failure in sh`forkshell : > > # svnlite diff /usr/src/sys/arm64/arm64/swtch.S > Index: /usr/src/sys/arm64/arm64/swtch.S > =================================================================== > --- /usr/src/sys/arm64/arm64/swtch.S (revision 312982) > +++ /usr/src/sys/arm64/arm64/swtch.S (working copy) > @@ -241,6 +241,12 @@ > mov fp, #0 /* Stack traceback stops here. */ > bl _C_LABEL(fork_exit) > > + /* > + * Disable interrupts to avoid > + * overwriting sp_el0 and spsr_el1 by an IRQ exception. > + */ > + msr daifset, #2 > + > /* Restore sp and lr */ > ldp x0, x1, [sp] > msr sp_el0, x0 > @@ -263,12 +269,6 @@ > ldp x28, x29, [sp, #TF_X + 28 * 8] > /* Skip x30 as it was restored above as lr */ > > - /* > - * Disable interrupts to avoid > - * overwriting spsr_el1 by an IRQ exception. > - */ > - msr daifset, #2 > - > /* Restore elr and spsr */ > ldp x0, x1, [sp, #16] > msr elr_el1, x0 > > I'm going to switch to attempting a self-hosted buildworld > buildkernel again. > > === > Mark Millard > markmi at dsl-only.net > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" This patch or some other about this bug was committed to HEAD? []'s -Otacilio