* [PATCH v3] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE
@ 2021-07-22 2:20 Shaokun Zhang
2021-07-30 12:12 ` Will Deacon
2021-07-30 18:01 ` Catalin Marinas
0 siblings, 2 replies; 3+ messages in thread
From: Shaokun Zhang @ 2021-07-22 2:20 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Lingyan Huang, Vladimir Murzin, Catalin Marinas, Will Deacon,
Shaokun Zhang
From: Lingyan Huang <huanglingyan2@huawei.com>
The current code to print PSTATE when generating backtraces does not
include SSBS bit and DIT bit, so add this information.
Cc: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Lingyan Huang <huanglingyan2@huawei.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
ChangeLog:
v2-->v3:
1. Drop PAN exposing for 32-bit userspace from Will
v1-->v2:
1. Address Vladimir's comment on update compat_user_mode
arch/arm64/kernel/process.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index c8989b999250..5e13a74b11b3 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -163,7 +163,7 @@ static void print_pstate(struct pt_regs *regs)
u64 pstate = regs->pstate;
if (compat_user_mode(regs)) {
- printk("pstate: %08llx (%c%c%c%c %c %s %s %c%c%c)\n",
+ printk("pstate: %08llx (%c%c%c%c %c %s %s %c%c%c %cDIT %cSSBS)\n",
pstate,
pstate & PSR_AA32_N_BIT ? 'N' : 'n',
pstate & PSR_AA32_Z_BIT ? 'Z' : 'z',
@@ -174,12 +174,14 @@ static void print_pstate(struct pt_regs *regs)
pstate & PSR_AA32_E_BIT ? "BE" : "LE",
pstate & PSR_AA32_A_BIT ? 'A' : 'a',
pstate & PSR_AA32_I_BIT ? 'I' : 'i',
- pstate & PSR_AA32_F_BIT ? 'F' : 'f');
+ pstate & PSR_AA32_F_BIT ? 'F' : 'f',
+ pstate & PSR_AA32_DIT_BIT ? '+' : '-',
+ pstate & PSR_AA32_SSBS_BIT ? '+' : '-');
} else {
const char *btype_str = btypes[(pstate & PSR_BTYPE_MASK) >>
PSR_BTYPE_SHIFT];
- printk("pstate: %08llx (%c%c%c%c %c%c%c%c %cPAN %cUAO %cTCO BTYPE=%s)\n",
+ printk("pstate: %08llx (%c%c%c%c %c%c%c%c %cPAN %cUAO %cTCO %cDIT %cSSBS BTYPE=%s)\n",
pstate,
pstate & PSR_N_BIT ? 'N' : 'n',
pstate & PSR_Z_BIT ? 'Z' : 'z',
@@ -192,6 +194,8 @@ static void print_pstate(struct pt_regs *regs)
pstate & PSR_PAN_BIT ? '+' : '-',
pstate & PSR_UAO_BIT ? '+' : '-',
pstate & PSR_TCO_BIT ? '+' : '-',
+ pstate & PSR_DIT_BIT ? '+' : '-',
+ pstate & PSR_SSBS_BIT ? '+' : '-',
btype_str);
}
}
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE
2021-07-22 2:20 [PATCH v3] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE Shaokun Zhang
@ 2021-07-30 12:12 ` Will Deacon
2021-07-30 18:01 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2021-07-30 12:12 UTC (permalink / raw)
To: Shaokun Zhang
Cc: linux-arm-kernel, Lingyan Huang, Vladimir Murzin, Catalin Marinas
On Thu, Jul 22, 2021 at 10:20:36AM +0800, Shaokun Zhang wrote:
> From: Lingyan Huang <huanglingyan2@huawei.com>
>
> The current code to print PSTATE when generating backtraces does not
> include SSBS bit and DIT bit, so add this information.
>
> Cc: Vladimir Murzin <vladimir.murzin@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
> Signed-off-by: Lingyan Huang <huanglingyan2@huawei.com>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
> ---
> ChangeLog:
> v2-->v3:
> 1. Drop PAN exposing for 32-bit userspace from Will
>
> v1-->v2:
> 1. Address Vladimir's comment on update compat_user_mode
>
> arch/arm64/kernel/process.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE
2021-07-22 2:20 [PATCH v3] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE Shaokun Zhang
2021-07-30 12:12 ` Will Deacon
@ 2021-07-30 18:01 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2021-07-30 18:01 UTC (permalink / raw)
To: linux-arm-kernel, Shaokun Zhang
Cc: Will Deacon, Vladimir Murzin, Lingyan Huang
On Thu, 22 Jul 2021 10:20:36 +0800, Shaokun Zhang wrote:
> The current code to print PSTATE when generating backtraces does not
> include SSBS bit and DIT bit, so add this information.
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE
https://git.kernel.org/arm64/c/ec63e300fa8b
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-30 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 2:20 [PATCH v3] arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE Shaokun Zhang
2021-07-30 12:12 ` Will Deacon
2021-07-30 18:01 ` Catalin Marinas
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.