Skip to content

Commit ec63e30

Browse files
lpyhlyctmarinas
authored andcommitted
arm64: SSBS/DIT: print SSBS and DIT bit when printing PSTATE
The current code to print PSTATE when generating backtraces does not include SSBS bit and DIT bit, so add this information. Cc: Vladimir Murzin <[email protected]> Cc: Will Deacon <[email protected]> Reviewed-by: Vladimir Murzin <[email protected]> Signed-off-by: Lingyan Huang <[email protected]> Signed-off-by: Shaokun Zhang <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent ff85f10 commit ec63e30

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

arch/arm64/kernel/process.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void print_pstate(struct pt_regs *regs)
163163
u64 pstate = regs->pstate;
164164

165165
if (compat_user_mode(regs)) {
166-
printk("pstate: %08llx (%c%c%c%c %c %s %s %c%c%c)\n",
166+
printk("pstate: %08llx (%c%c%c%c %c %s %s %c%c%c %cDIT %cSSBS)\n",
167167
pstate,
168168
pstate & PSR_AA32_N_BIT ? 'N' : 'n',
169169
pstate & PSR_AA32_Z_BIT ? 'Z' : 'z',
@@ -174,12 +174,14 @@ static void print_pstate(struct pt_regs *regs)
174174
pstate & PSR_AA32_E_BIT ? "BE" : "LE",
175175
pstate & PSR_AA32_A_BIT ? 'A' : 'a',
176176
pstate & PSR_AA32_I_BIT ? 'I' : 'i',
177-
pstate & PSR_AA32_F_BIT ? 'F' : 'f');
177+
pstate & PSR_AA32_F_BIT ? 'F' : 'f',
178+
pstate & PSR_AA32_DIT_BIT ? '+' : '-',
179+
pstate & PSR_AA32_SSBS_BIT ? '+' : '-');
178180
} else {
179181
const char *btype_str = btypes[(pstate & PSR_BTYPE_MASK) >>
180182
PSR_BTYPE_SHIFT];
181183

182-
printk("pstate: %08llx (%c%c%c%c %c%c%c%c %cPAN %cUAO %cTCO BTYPE=%s)\n",
184+
printk("pstate: %08llx (%c%c%c%c %c%c%c%c %cPAN %cUAO %cTCO %cDIT %cSSBS BTYPE=%s)\n",
183185
pstate,
184186
pstate & PSR_N_BIT ? 'N' : 'n',
185187
pstate & PSR_Z_BIT ? 'Z' : 'z',
@@ -192,6 +194,8 @@ static void print_pstate(struct pt_regs *regs)
192194
pstate & PSR_PAN_BIT ? '+' : '-',
193195
pstate & PSR_UAO_BIT ? '+' : '-',
194196
pstate & PSR_TCO_BIT ? '+' : '-',
197+
pstate & PSR_DIT_BIT ? '+' : '-',
198+
pstate & PSR_SSBS_BIT ? '+' : '-',
195199
btype_str);
196200
}
197201
}

0 commit comments

Comments
 (0)