@@ -1440,6 +1440,39 @@ static int tagged_addr_ctrl_set(struct task_struct *target, const struct
1440
1440
}
1441
1441
#endif
1442
1442
1443
+ #ifdef CONFIG_ARM64_POE
1444
+ static int poe_get (struct task_struct * target ,
1445
+ const struct user_regset * regset ,
1446
+ struct membuf to )
1447
+ {
1448
+ if (!system_supports_poe ())
1449
+ return - EINVAL ;
1450
+
1451
+ return membuf_write (& to , & target -> thread .por_el0 ,
1452
+ sizeof (target -> thread .por_el0 ));
1453
+ }
1454
+
1455
+ static int poe_set (struct task_struct * target , const struct
1456
+ user_regset * regset , unsigned int pos ,
1457
+ unsigned int count , const void * kbuf , const
1458
+ void __user * ubuf )
1459
+ {
1460
+ int ret ;
1461
+ long ctrl ;
1462
+
1463
+ if (!system_supports_poe ())
1464
+ return - EINVAL ;
1465
+
1466
+ ret = user_regset_copyin (& pos , & count , & kbuf , & ubuf , & ctrl , 0 , -1 );
1467
+ if (ret )
1468
+ return ret ;
1469
+
1470
+ target -> thread .por_el0 = ctrl ;
1471
+
1472
+ return 0 ;
1473
+ }
1474
+ #endif
1475
+
1443
1476
enum aarch64_regset {
1444
1477
REGSET_GPR ,
1445
1478
REGSET_FPR ,
@@ -1469,6 +1502,9 @@ enum aarch64_regset {
1469
1502
#ifdef CONFIG_ARM64_TAGGED_ADDR_ABI
1470
1503
REGSET_TAGGED_ADDR_CTRL ,
1471
1504
#endif
1505
+ #ifdef CONFIG_ARM64_POE
1506
+ REGSET_POE
1507
+ #endif
1472
1508
};
1473
1509
1474
1510
static const struct user_regset aarch64_regsets [] = {
@@ -1628,6 +1664,16 @@ static const struct user_regset aarch64_regsets[] = {
1628
1664
.set = tagged_addr_ctrl_set ,
1629
1665
},
1630
1666
#endif
1667
+ #ifdef CONFIG_ARM64_POE
1668
+ [REGSET_POE ] = {
1669
+ .core_note_type = NT_ARM_POE ,
1670
+ .n = 1 ,
1671
+ .size = sizeof (long ),
1672
+ .align = sizeof (long ),
1673
+ .regset_get = poe_get ,
1674
+ .set = poe_set ,
1675
+ },
1676
+ #endif
1631
1677
};
1632
1678
1633
1679
static const struct user_regset_view user_aarch64_view = {
0 commit comments