From owner-freebsd-arm@freebsd.org Thu Jul 16 10:02:29 2015 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 9B3719A2BAE for ; Thu, 16 Jul 2015 10:02:29 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 7F34D1DE7 for ; Thu, 16 Jul 2015 10:02:29 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by phabric-backend.isc.freebsd.org (Postfix, from userid 1346) id 7BEBDE7D8; Thu, 16 Jul 2015 10:02:29 +0000 (UTC) Date: Thu, 16 Jul 2015 10:02:29 +0000 To: freebsd-arm@freebsd.org From: "kib (Konstantin Belousov)" Reply-to: D3094+327+b6ce39a707c1ba10@FreeBSD.org Subject: [Differential] [Commented On] D3094: Fix KSTACK_PAGES issue Message-ID: <8b52536eef050c3cbf22722249062f45@localhost.localdomain> X-Priority: 3 Thread-Topic: D3094: Fix ARMv8 KSTACK_PAGES issue X-Herald-Rules: <28>, <31>, <32>, <34> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: MTE0MDI0ZWQ5YjVlYzUxYzUyMWU4OWFkZjdhIFWngTU= Precedence: bulk X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2015 10:02:29 -0000 kib added a comment. In https://reviews.freebsd.org/D3094#61493, @kib wrote: > > Note that it uncovers more serious issues. E.g., the quick look at the amd64/amd64/stack_machdep.c clearly indicates that the use of KSTACK_PAGES there is bogus, probably curthread->td_kstack_pages is the right thing to use, but it is still not quite correct as well. In fact, the if() should check whether the f_frame is inside the [curthread->td_kstack; curthread->td_kstack + PAGE_SIZE * curthread->td_kstack_pages). https://reviews.freebsd.org/D3108 should fix the x86 issue, and allow you to drop these files from your change. REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D3094 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: wma_semihalf.com, emaste, zbb, andrew, kib Cc: kib, imp, andrew, freebsd-arm-list, emaste