From owner-dev-commits-src-main@freebsd.org Wed Dec 30 22:53:45 2020 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B3944D1AEE; Wed, 30 Dec 2020 22:53:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5mmT3MgFz4p0y; Wed, 30 Dec 2020 22:53:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 607478F98; Wed, 30 Dec 2020 22:53:45 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 2A46527C0054; Wed, 30 Dec 2020 17:53:45 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 17:53:45 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 807A5C200A5; Wed, 30 Dec 2020 17:53:45 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <050b7622-0766-42b9-a7a3-420f586e39ea@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> References: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:53:25 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_76ff03aef741_-_main_-_powerpc:_Fix_copyin/copyout_rac?= =?UTF-8?Q?e_condition?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the main branch of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:53:45 -0000 Note: This commit series is stuff salvaged from jhibbits' local tree. Apologies for the malformed commit messages, Piotr and I were discussing them in IRC earlier and I was under the mistaken assumption that they would get reworded before the push. On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=76ff03aef7411e601673dfc997bd6d691bd9a14e > > commit 76ff03aef7411e601673dfc997bd6d691bd9a14e > Author: Justin Hibbits > AuthorDate: 2020-12-08 22:49:25 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:44 +0000 > > powerpc: Fix copyin/copyout race condition > > It's possible for a context switch, and CPU migration, to occur between > fetching the PCPU context and extracting the pc_curpcb. This can cause > the fault handler to be installed for the wrong thread, leading to a > panic in copyin()/copyout(). Since curthread is already in %r13, just > use that directly, as GPRs are migrated, so there is no migration race > risk. -- Brandon Bergren bdragon@FreeBSD.org