@@ -505,36 +505,29 @@ bad_one_auted_one_checked_multi_bb:
505
505
// * untrusted: not even s - t - d - from arg and from memory
506
506
// * untrusted: subreg clobbered - between address materialization and use , between auth and check , between check and use
507
507
// * untrusted: first checked then auted , auted then auted , checked then checked
508
- //
509
- // Note th at it is important to sign and authenticate LR , as it is not kept
510
- // safe - to - dereference across unconditional branches.
511
508
512
509
.globl good_sign_addr_mat_nocfg
513
510
.type good_sign_addr_mat_nocfg , @function
514
511
good_sign_addr_mat_nocfg:
515
512
// CHECK - NOT : good_sign_addr_mat_nocfg
516
- paciasp
517
513
adr x3 , 1f
518
514
br x3
519
515
1 :
520
516
adr x0 , sym
521
517
pacda x0 , x1
522
- autiasp
523
518
ret
524
519
.size good_sign_addr_mat_nocfg , . - good_sign_addr_mat_nocfg
525
520
526
521
.globl good_sign_auted_checked_ldr_nocfg
527
522
.type good_sign_auted_checked_ldr_nocfg , @function
528
523
good_sign_auted_checked_ldr_nocfg:
529
524
// CHECK - NOT : good_sign_auted_checked_ldr_nocfg
530
- paciasp
531
525
adr x3 , 1f
532
526
br x3
533
527
1 :
534
528
autda x0 , x2
535
529
ldr x2 , [ x0 ]
536
530
pacda x0 , x1
537
- autiasp
538
531
ret
539
532
.size good_sign_auted_checked_ldr_nocfg , . - good_sign_auted_checked_ldr_nocfg
540
533
@@ -544,13 +537,11 @@ bad_sign_authed_unchecked_nocfg:
544
537
// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_sign_authed_unchecked_nocfg , at address
545
538
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
546
539
// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
547
- paciasp
548
540
adr x3 , 1f
549
541
br x3
550
542
1 :
551
543
autda x0 , x2
552
544
pacda x0 , x1
553
- autiasp
554
545
ret
555
546
.size bad_sign_authed_unchecked_nocfg , . - bad_sign_authed_unchecked_nocfg
556
547
@@ -560,13 +551,11 @@ bad_sign_checked_not_auted_nocfg:
560
551
// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_sign_checked_not_auted_nocfg , at address
561
552
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
562
553
// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
563
- paciasp
564
554
adr x3 , 1f
565
555
br x3
566
556
1 :
567
557
ldr x2 , [ x0 ]
568
558
pacda x0 , x1
569
- autiasp
570
559
ret
571
560
.size bad_sign_checked_not_auted_nocfg , . - bad_sign_checked_not_auted_nocfg
572
561
@@ -576,12 +565,10 @@ bad_sign_plain_arg_nocfg:
576
565
// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_sign_plain_arg_nocfg , at address
577
566
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
578
567
// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
579
- paciasp
580
568
adr x3 , 1f
581
569
br x3
582
570
1 :
583
571
pacda x0 , x1
584
- autiasp
585
572
ret
586
573
.size bad_sign_plain_arg_nocfg , . - bad_sign_plain_arg_nocfg
587
574
@@ -592,13 +579,11 @@ bad_sign_plain_mem_nocfg:
592
579
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
593
580
// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
594
581
// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: ldr x0 , [ x1 ]
595
- paciasp
596
582
adr x3 , 1f
597
583
br x3
598
584
1 :
599
585
ldr x0 , [ x1 ]
600
586
pacda x0 , x1
601
- autiasp
602
587
ret
603
588
.size bad_sign_plain_mem_nocfg , . - bad_sign_plain_mem_nocfg
604
589
@@ -609,14 +594,12 @@ bad_clobber_between_addr_mat_and_use_nocfg:
609
594
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
610
595
// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
611
596
// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: mov w0 , w4
612
- paciasp
613
597
adr x3 , 1f
614
598
br x3
615
599
1 :
616
600
adr x0 , sym
617
601
mov w0 , w4
618
602
pacda x0 , x1
619
- autiasp
620
603
ret
621
604
.size bad_clobber_between_addr_mat_and_use_nocfg , . - bad_clobber_between_addr_mat_and_use_nocfg
622
605
@@ -627,15 +610,13 @@ bad_clobber_between_auted_and_checked_nocfg:
627
610
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
628
611
// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
629
612
// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: mov w0 , w4
630
- paciasp
631
613
adr x3 , 1f
632
614
br x3
633
615
1 :
634
616
autda x0 , x2
635
617
mov w0 , w4
636
618
ldr x2 , [ x0 ]
637
619
pacda x0 , x1
638
- autiasp
639
620
ret
640
621
.size bad_clobber_between_auted_and_checked_nocfg , . - bad_clobber_between_auted_and_checked_nocfg
641
622
@@ -646,15 +627,13 @@ bad_clobber_between_checked_and_used_nocfg:
646
627
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
647
628
// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
648
629
// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: mov w0 , w4
649
- paciasp
650
630
adr x3 , 1f
651
631
br x3
652
632
1 :
653
633
autda x0 , x2
654
634
ldr x2 , [ x0 ]
655
635
mov w0 , w4
656
636
pacda x0 , x1
657
- autiasp
658
637
ret
659
638
.size bad_clobber_between_checked_and_used_nocfg , . - bad_clobber_between_checked_and_used_nocfg
660
639
@@ -664,14 +643,12 @@ bad_transition_check_then_auth_nocfg:
664
643
// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_transition_check_then_auth_nocfg , at address
665
644
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
666
645
// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
667
- paciasp
668
646
adr x3 , 1f
669
647
br x3
670
648
1 :
671
649
ldr x2 , [ x0 ]
672
650
autda x0 , x2
673
651
pacda x0 , x1
674
- autiasp
675
652
ret
676
653
.size bad_transition_check_then_auth_nocfg , . - bad_transition_check_then_auth_nocfg
677
654
@@ -681,14 +658,12 @@ bad_transition_auth_then_auth_nocfg:
681
658
// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_transition_auth_then_auth_nocfg , at address
682
659
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
683
660
// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
684
- paciasp
685
661
adr x3 , 1f
686
662
br x3
687
663
1 :
688
664
autda x0 , x2
689
665
autda x0 , x2
690
666
pacda x0 , x1
691
- autiasp
692
667
ret
693
668
.size bad_transition_auth_then_auth_nocfg , . - bad_transition_auth_then_auth_nocfg
694
669
@@ -698,14 +673,12 @@ bad_transition_check_then_check_nocfg:
698
673
// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_transition_check_then_check_nocfg , at address
699
674
// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
700
675
// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
701
- paciasp
702
676
adr x3 , 1f
703
677
br x3
704
678
1 :
705
679
ldr x2 , [ x0 ]
706
680
ldr x2 , [ x0 ]
707
681
pacda x0 , x1
708
- autiasp
709
682
ret
710
683
.size bad_transition_check_then_check_nocfg , . - bad_transition_check_then_check_nocfg
711
684
0 commit comments