All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregkh@linuxfoundation.org (Greg KH)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -stable] arm64: mm: don't write garbage into TTBR1_EL1 register
Date: Sat, 24 Feb 2018 09:34:24 +0100	[thread overview]
Message-ID: <20180224083424.GC9681@kroah.com> (raw)
In-Reply-To: <20180223182902.24873-1-ard.biesheuvel@linaro.org>

On Fri, Feb 23, 2018 at 06:29:02PM +0000, Ard Biesheuvel wrote:
> Stable backport commit 173358a49173 ("arm64: kpti: Add ->enable callback
> to remap swapper using nG mappings") of upstream commit f992b4dfd58b did
> not survive the backporting process unscathed, and ends up writing garbage
> into the TTBR1_EL1 register, rather than pointing it to the zero page to
> disable translations. Fix that.
> 
> Cc: <stable@vger.kernel.org> #v4.14
> Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/arm64/mm/proc.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Any reason why you didn't cc: the stable list, as this is a patch that
is not needed in mainline, right?

> diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
> index 08572f95bd8a..2b473ddeb7a3 100644
> --- a/arch/arm64/mm/proc.S
> +++ b/arch/arm64/mm/proc.S
> @@ -155,7 +155,7 @@ ENDPROC(cpu_do_switch_mm)
>  
>  .macro	__idmap_cpu_set_reserved_ttbr1, tmp1, tmp2
>  	adrp	\tmp1, empty_zero_page
> -	msr	ttbr1_el1, \tmp2
> +	msr	ttbr1_el1, \tmp1

I don't understand why this isn't also needed in Linus's tree.  What
commit there prevents this from being required?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, stable@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com,
	will.deacon@arm.com, marc.zyngier@arm.com, mark.rutland@arm.com,
	nicolas.dechesne@linaro.org
Subject: Re: [PATCH -stable] arm64: mm: don't write garbage into TTBR1_EL1 register
Date: Sat, 24 Feb 2018 09:34:24 +0100	[thread overview]
Message-ID: <20180224083424.GC9681@kroah.com> (raw)
In-Reply-To: <20180223182902.24873-1-ard.biesheuvel@linaro.org>

On Fri, Feb 23, 2018 at 06:29:02PM +0000, Ard Biesheuvel wrote:
> Stable backport commit 173358a49173 ("arm64: kpti: Add ->enable callback
> to remap swapper using nG mappings") of upstream commit f992b4dfd58b did
> not survive the backporting process unscathed, and ends up writing garbage
> into the TTBR1_EL1 register, rather than pointing it to the zero page to
> disable translations. Fix that.
> 
> Cc: <stable@vger.kernel.org> #v4.14
> Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/arm64/mm/proc.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Any reason why you didn't cc: the stable list, as this is a patch that
is not needed in mainline, right?

> diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
> index 08572f95bd8a..2b473ddeb7a3 100644
> --- a/arch/arm64/mm/proc.S
> +++ b/arch/arm64/mm/proc.S
> @@ -155,7 +155,7 @@ ENDPROC(cpu_do_switch_mm)
>  
>  .macro	__idmap_cpu_set_reserved_ttbr1, tmp1, tmp2
>  	adrp	\tmp1, empty_zero_page
> -	msr	ttbr1_el1, \tmp2
> +	msr	ttbr1_el1, \tmp1

I don't understand why this isn't also needed in Linus's tree.  What
commit there prevents this from being required?

thanks,

greg k-h

  parent reply	other threads:[~2018-02-24  8:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 18:29 [PATCH -stable] arm64: mm: don't write garbage into TTBR1_EL1 register Ard Biesheuvel
2018-02-23 20:33 ` Nicolas Dechesne
2018-02-24  8:34 ` Greg KH [this message]
2018-02-24  8:34   ` Greg KH
2018-02-24  8:49   ` Nicolas Dechesne
2018-02-24  8:49     ` Nicolas Dechesne
2018-02-24  8:50   ` Ard Biesheuvel
2018-02-24  8:50     ` Ard Biesheuvel
2018-02-26 11:30     ` Will Deacon
2018-02-26 11:30       ` Will Deacon
2018-02-26 11:37       ` Ard Biesheuvel
2018-02-26 11:37         ` Ard Biesheuvel
2018-02-28 10:23       ` Jan Glauber
2018-02-28 10:23         ` Jan Glauber
2018-02-26 13:02 ` Patch "arm64: mm: don't write garbage into TTBR1_EL1 register" has been added to the 4.14-stable tree gregkh
2018-02-26 13:02 ` Patch "arm64: mm: don't write garbage into TTBR1_EL1 register" has been added to the 4.15-stable tree gregkh
2018-02-26 13:02 ` Patch "arm64: mm: don't write garbage into TTBR1_EL1 register" has been added to the 4.4-stable tree gregkh
2018-02-26 13:09   ` Ard Biesheuvel
2018-02-26 14:26     ` Greg Kroah-Hartman

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=20180224083424.GC9681@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.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.