Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 2020 16:53:25 -0600
From:      "Brandon Bergren" <bdragon@FreeBSD.org>
To:        "Piotr Kubaj" <pkubaj@FreeBSD.org>, 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?=
Message-ID:  <050b7622-0766-42b9-a7a3-420f586e39ea@www.fastmail.com>
In-Reply-To: <202012302245.0BUMjrpm032399@gitrepo.freebsd.org>
References:  <202012302245.0BUMjrpm032399@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <chmeeedalf@gmail.com>
> AuthorDate: 2020-12-08 22:49:25 +0000
> Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?050b7622-0766-42b9-a7a3-420f586e39ea>