[PATCH v4 5/8] arm64: probes: Add GCS support to bl/blr/ret
Mark Brown
broonie at kernel.org
Wed Jul 23 04:13:20 PDT 2025
On Wed, Jul 23, 2025 at 11:00:33AM +0100, Catalin Marinas wrote:
> On Fri, Jul 18, 2025 at 11:37:37PM -0500, Jeremy Linton wrote:
> > @@ -133,17 +147,26 @@ simulate_br_blr(u32 opcode, long addr, struct pt_regs *regs)
> > /* update pc first in case we're doing a "blr lr" */
> > instruction_pointer_set(regs, get_x_reg(regs, xn));
> >
> > - /* Link register is x30 */
> > if (((opcode >> 21) & 0x3) == 1)
> > - set_x_reg(regs, 30, addr + 4);
> > + update_lr(regs, addr);
> > }
> I can see why this function was originally updating PC (in case of a blr
> lr) but updating the LR was not supposed to fail. With GCS, I think we
> should follow similar logic to simulate_b_bl() and skip updating PC/LR
> if the write to the GCS failed (assuming that's what the hardware does,
> I haven't checked the spec).
Yes, the pseudocode does the GCS validation before it starts updating
BTYPE or any of the registers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250723/ce3c10dd/attachment.sig>
More information about the linux-arm-kernel
mailing list