All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-arm-kernel@lists.infradead.org,
	D Scott Phillips <scott@os.amperecomputing.com>
Cc: Will Deacon <will@kernel.org>,
	patches@amperecomputing.com,
	Darren Hart <darren@os.amperecomputing.com>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH v5] arm64: errata: Fix exec handling in erratum 1418040 workaround
Date: Wed, 22 Dec 2021 15:23:34 +0000	[thread overview]
Message-ID: <164018659839.257110.10503084732579119152.b4-ty@arm.com> (raw)
In-Reply-To: <20211220234114.3926-1-scott@os.amperecomputing.com>

On Mon, 20 Dec 2021 15:41:14 -0800, D Scott Phillips wrote:
> The erratum 1418040 workaround enables CNTVCT_EL1 access trapping in EL0
> when executing compat threads. The workaround is applied when switching
> between tasks, but the need for the workaround could also change at an
> exec(), when a non-compat task execs a compat binary or vice versa. Apply
> the workaround in arch_setup_new_exec().
> 
> This leaves a small window of time between SET_PERSONALITY and
> arch_setup_new_exec where preemption could occur and confuse the old
> workaround logic that compares TIF_32BIT between prev and next. Instead, we
> can just read cntkctl to make sure it's in the state that the next task
> needs. I measured cntkctl read time to be about the same as a mov from a
> general-purpose register on N1. Update the workaround logic to examine the
> current value of cntkctl instead of the previous task's compat state.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: errata: Fix exec handling in erratum 1418040 workaround
      https://git.kernel.org/arm64/c/38e0257e0e6f

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-12-22 15:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 23:41 [PATCH v5] arm64: errata: Fix exec handling in erratum 1418040 workaround D Scott Phillips
2021-12-21 11:30 ` Catalin Marinas
2021-12-21 20:10   ` D Scott Phillips
2021-12-22 11:03     ` Catalin Marinas
2021-12-22 12:44       ` Marc Zyngier
2021-12-22 15:23 ` Catalin Marinas [this message]
2021-12-22 15:25 ` Catalin Marinas
2021-12-22 16:12   ` D Scott Phillips
2021-12-23 11:43     ` Catalin Marinas
2021-12-23 18:22       ` D Scott Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164018659839.257110.10503084732579119152.b4-ty@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=darren@os.amperecomputing.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=patches@amperecomputing.com \
    --cc=scott@os.amperecomputing.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.