Hi Kuan-Ying,

On Mon, 2024-08-19 at 17:43 +0800, Kuan-Ying Lee wrote:
> On Sat, Aug 17, 2024 at 01:36:33AM +0200, Mark Wielaard wrote:
> > On Wed, Aug 14, 2024 at 04:51:19PM +0800, Kuan-Ying Lee wrote:
> > > Add the NT_ARM_PAC_MASK and NT_ARM_PAC_ENABLED_KEYS for aarch64.
> > > Recognize and print the new core item.
> > 
> > For NT_ARM_PAC_MASK it looks like the user_pac_mask struct, so two 8
> > byte words. But for NT_ARM_PAC_ENABLED_KEYS I cannot find the
> > definition. This assumes it is just one 8 byte word. Is that correct?
> > Can it be more than one?
> > 
> 
> I believe it should be exactly one 8-byte word in size.
> I based this on the following code[1]:
> 
>  |    [REGSET_PAC_ENABLED_KEYS] = {
>  |            .core_note_type = NT_ARM_PAC_ENABLED_KEYS,
>  |            .n = 1,
>  |            .size = sizeof(long),
>  |            .align = sizeof(long),
>  |            .regset_get = pac_enabled_keys_get,
>  |            .set = pac_enabled_keys_set,
> 
> The size is sizeof(long), and n is 1.
> It seems that there is only 1 8-byte word for arm64.
> 
> [1] 
> https://elixir.bootlin.com/linux/v6.10.5/source/arch/arm64/kernel/ptrace.c#L1595

Thanks, so your code looks correct.

I rebased it on top of the PAC unwinding patches (which already
contained an definition of the pac_mask, but didn't add it to the known
types yet) and pushed it.

Thanks,

Mark

Reply via email to