linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: update PAC description for kernel
@ 2021-12-01  3:40 Kuan-Ying Lee
  2021-12-02 10:06 ` Mark Rutland
  2021-12-02 10:59 ` Will Deacon
  0 siblings, 2 replies; 4+ messages in thread
From: Kuan-Ying Lee @ 2021-12-01  3:40 UTC (permalink / raw)
  To: Mark Rutland, Catalin Marinas, Will Deacon, Jonathan Corbet,
	Matthias Brugger
  Cc: chinwen.chang, nicholas.tang, james.hsu, Kuan-Ying Lee,
	linux-arm-kernel, linux-doc, linux-kernel, linux-mediatek

Remove the paragraph which has nothing to do with the kernel and
add PAC description related to kernel.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
---
v1 -> v2:
  - Remove compiler option description
  - Add PAC description for kernel

 Documentation/arm64/pointer-authentication.rst | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/arm64/pointer-authentication.rst b/Documentation/arm64/pointer-authentication.rst
index f127666ea3a8..e5dad2e40aa8 100644
--- a/Documentation/arm64/pointer-authentication.rst
+++ b/Documentation/arm64/pointer-authentication.rst
@@ -53,11 +53,10 @@ The number of bits that the PAC occupies in a pointer is 55 minus the
 virtual address size configured by the kernel. For example, with a
 virtual address size of 48, the PAC is 7 bits wide.
 
-Recent versions of GCC can compile code with APIAKey-based return
-address protection when passed the -msign-return-address option. This
-uses instructions in the HINT space (unless -march=armv8.3-a or higher
-is also passed), and such code can run on systems without the pointer
-authentication extension.
+When ARM64_PTR_AUTH_KERNEL is selected, the kernel will be compiled
+with HINT space pointer authentication instructions protecting
+function returns. Kernels built with this option will work on hardware
+with or without pointer authentication support.
 
 In addition to exec(), keys can also be reinitialized to random values
 using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY,
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: update PAC description for kernel
  2021-12-01  3:40 [PATCH v2] arm64: update PAC description for kernel Kuan-Ying Lee
@ 2021-12-02 10:06 ` Mark Rutland
  2021-12-02 10:08   ` Will Deacon
  2021-12-02 10:59 ` Will Deacon
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2021-12-02 10:06 UTC (permalink / raw)
  To: Kuan-Ying Lee
  Cc: Catalin Marinas, Will Deacon, Jonathan Corbet, Matthias Brugger,
	chinwen.chang, nicholas.tang, james.hsu, linux-arm-kernel,
	linux-doc, linux-kernel, linux-mediatek

On Wed, Dec 01, 2021 at 11:40:10AM +0800, Kuan-Ying Lee wrote:
> Remove the paragraph which has nothing to do with the kernel and
> add PAC description related to kernel.
> 
> Suggested-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>

This looks good to me.

Catalin/Will, did you want to pick this, or do you want Jonathan to do so?

Mark.

> ---
> v1 -> v2:
>   - Remove compiler option description
>   - Add PAC description for kernel
> 
>  Documentation/arm64/pointer-authentication.rst | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/arm64/pointer-authentication.rst b/Documentation/arm64/pointer-authentication.rst
> index f127666ea3a8..e5dad2e40aa8 100644
> --- a/Documentation/arm64/pointer-authentication.rst
> +++ b/Documentation/arm64/pointer-authentication.rst
> @@ -53,11 +53,10 @@ The number of bits that the PAC occupies in a pointer is 55 minus the
>  virtual address size configured by the kernel. For example, with a
>  virtual address size of 48, the PAC is 7 bits wide.
>  
> -Recent versions of GCC can compile code with APIAKey-based return
> -address protection when passed the -msign-return-address option. This
> -uses instructions in the HINT space (unless -march=armv8.3-a or higher
> -is also passed), and such code can run on systems without the pointer
> -authentication extension.
> +When ARM64_PTR_AUTH_KERNEL is selected, the kernel will be compiled
> +with HINT space pointer authentication instructions protecting
> +function returns. Kernels built with this option will work on hardware
> +with or without pointer authentication support.
>  
>  In addition to exec(), keys can also be reinitialized to random values
>  using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY,
> -- 
> 2.18.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: update PAC description for kernel
  2021-12-02 10:06 ` Mark Rutland
@ 2021-12-02 10:08   ` Will Deacon
  0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2021-12-02 10:08 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Kuan-Ying Lee, Catalin Marinas, Jonathan Corbet,
	Matthias Brugger, chinwen.chang, nicholas.tang, james.hsu,
	linux-arm-kernel, linux-doc, linux-kernel, linux-mediatek

On Thu, Dec 02, 2021 at 10:06:47AM +0000, Mark Rutland wrote:
> On Wed, Dec 01, 2021 at 11:40:10AM +0800, Kuan-Ying Lee wrote:
> > Remove the paragraph which has nothing to do with the kernel and
> > add PAC description related to kernel.
> > 
> > Suggested-by: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> 
> This looks good to me.
> 
> Catalin/Will, did you want to pick this, or do you want Jonathan to do so?

I can grab it.

Will

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: update PAC description for kernel
  2021-12-01  3:40 [PATCH v2] arm64: update PAC description for kernel Kuan-Ying Lee
  2021-12-02 10:06 ` Mark Rutland
@ 2021-12-02 10:59 ` Will Deacon
  1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2021-12-02 10:59 UTC (permalink / raw)
  To: Catalin Marinas, Mark Rutland, Jonathan Corbet, Kuan-Ying Lee,
	Matthias Brugger
  Cc: kernel-team, Will Deacon, nicholas.tang, linux-kernel,
	chinwen.chang, james.hsu, linux-doc, linux-arm-kernel,
	linux-mediatek

On Wed, 1 Dec 2021 11:40:10 +0800, Kuan-Ying Lee wrote:
> Remove the paragraph which has nothing to do with the kernel and
> add PAC description related to kernel.
> 
> 

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

[1/1] arm64: update PAC description for kernel
      https://git.kernel.org/arm64/c/ce39d473d1ed

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-02 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01  3:40 [PATCH v2] arm64: update PAC description for kernel Kuan-Ying Lee
2021-12-02 10:06 ` Mark Rutland
2021-12-02 10:08   ` Will Deacon
2021-12-02 10:59 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).