@@ -505,36 +505,29 @@ bad_one_auted_one_checked_multi_bb:
505505// * untrusted: not even s - t - d - from arg and from memory
506506// * untrusted: subreg clobbered - between address materialization and use , between auth and check , between check and use
507507// * 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.
511508
512509 .globl good_sign_addr_mat_nocfg
513510 .type good_sign_addr_mat_nocfg , @function
514511good_sign_addr_mat_nocfg:
515512// CHECK - NOT : good_sign_addr_mat_nocfg
516- paciasp
517513 adr x3 , 1f
518514 br x3
5195151 :
520516 adr x0 , sym
521517 pacda x0 , x1
522- autiasp
523518 ret
524519 .size good_sign_addr_mat_nocfg , . - good_sign_addr_mat_nocfg
525520
526521 .globl good_sign_auted_checked_ldr_nocfg
527522 .type good_sign_auted_checked_ldr_nocfg , @function
528523good_sign_auted_checked_ldr_nocfg:
529524// CHECK - NOT : good_sign_auted_checked_ldr_nocfg
530- paciasp
531525 adr x3 , 1f
532526 br x3
5335271 :
534528 autda x0 , x2
535529 ldr x2 , [ x0 ]
536530 pacda x0 , x1
537- autiasp
538531 ret
539532 .size good_sign_auted_checked_ldr_nocfg , . - good_sign_auted_checked_ldr_nocfg
540533
@@ -544,13 +537,11 @@ bad_sign_authed_unchecked_nocfg:
544537// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_sign_authed_unchecked_nocfg , at address
545538// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
546539// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
547- paciasp
548540 adr x3 , 1f
549541 br x3
5505421 :
551543 autda x0 , x2
552544 pacda x0 , x1
553- autiasp
554545 ret
555546 .size bad_sign_authed_unchecked_nocfg , . - bad_sign_authed_unchecked_nocfg
556547
@@ -560,13 +551,11 @@ bad_sign_checked_not_auted_nocfg:
560551// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_sign_checked_not_auted_nocfg , at address
561552// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
562553// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
563- paciasp
564554 adr x3 , 1f
565555 br x3
5665561 :
567557 ldr x2 , [ x0 ]
568558 pacda x0 , x1
569- autiasp
570559 ret
571560 .size bad_sign_checked_not_auted_nocfg , . - bad_sign_checked_not_auted_nocfg
572561
@@ -576,12 +565,10 @@ bad_sign_plain_arg_nocfg:
576565// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_sign_plain_arg_nocfg , at address
577566// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
578567// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
579- paciasp
580568 adr x3 , 1f
581569 br x3
5825701 :
583571 pacda x0 , x1
584- autiasp
585572 ret
586573 .size bad_sign_plain_arg_nocfg , . - bad_sign_plain_arg_nocfg
587574
@@ -592,13 +579,11 @@ bad_sign_plain_mem_nocfg:
592579// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
593580// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
594581// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: ldr x0 , [ x1 ]
595- paciasp
596582 adr x3 , 1f
597583 br x3
5985841 :
599585 ldr x0 , [ x1 ]
600586 pacda x0 , x1
601- autiasp
602587 ret
603588 .size bad_sign_plain_mem_nocfg , . - bad_sign_plain_mem_nocfg
604589
@@ -609,14 +594,12 @@ bad_clobber_between_addr_mat_and_use_nocfg:
609594// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
610595// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
611596// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: mov w0 , w4
612- paciasp
613597 adr x3 , 1f
614598 br x3
6155991 :
616600 adr x0 , sym
617601 mov w0 , w4
618602 pacda x0 , x1
619- autiasp
620603 ret
621604 .size bad_clobber_between_addr_mat_and_use_nocfg , . - bad_clobber_between_addr_mat_and_use_nocfg
622605
@@ -627,15 +610,13 @@ bad_clobber_between_auted_and_checked_nocfg:
627610// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
628611// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
629612// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: mov w0 , w4
630- paciasp
631613 adr x3 , 1f
632614 br x3
6336151 :
634616 autda x0 , x2
635617 mov w0 , w4
636618 ldr x2 , [ x0 ]
637619 pacda x0 , x1
638- autiasp
639620 ret
640621 .size bad_clobber_between_auted_and_checked_nocfg , . - bad_clobber_between_auted_and_checked_nocfg
641622
@@ -646,15 +627,13 @@ bad_clobber_between_checked_and_used_nocfg:
646627// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
647628// CHECK - NEXT: The 1 instructions th at write to the affected registers after any authentication are:
648629// CHECK - NEXT: 1 . {{ [ 0 - 9a - f ]+ }}: mov w0 , w4
649- paciasp
650630 adr x3 , 1f
651631 br x3
6526321 :
653633 autda x0 , x2
654634 ldr x2 , [ x0 ]
655635 mov w0 , w4
656636 pacda x0 , x1
657- autiasp
658637 ret
659638 .size bad_clobber_between_checked_and_used_nocfg , . - bad_clobber_between_checked_and_used_nocfg
660639
@@ -664,14 +643,12 @@ bad_transition_check_then_auth_nocfg:
664643// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_transition_check_then_auth_nocfg , at address
665644// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
666645// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
667- paciasp
668646 adr x3 , 1f
669647 br x3
6706481 :
671649 ldr x2 , [ x0 ]
672650 autda x0 , x2
673651 pacda x0 , x1
674- autiasp
675652 ret
676653 .size bad_transition_check_then_auth_nocfg , . - bad_transition_check_then_auth_nocfg
677654
@@ -681,14 +658,12 @@ bad_transition_auth_then_auth_nocfg:
681658// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_transition_auth_then_auth_nocfg , at address
682659// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
683660// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
684- paciasp
685661 adr x3 , 1f
686662 br x3
6876631 :
688664 autda x0 , x2
689665 autda x0 , x2
690666 pacda x0 , x1
691- autiasp
692667 ret
693668 .size bad_transition_auth_then_auth_nocfg , . - bad_transition_auth_then_auth_nocfg
694669
@@ -698,14 +673,12 @@ bad_transition_check_then_check_nocfg:
698673// CHECK - LABEL: GS - PAUTH: signing oracle found in function bad_transition_check_then_check_nocfg , at address
699674// CHECK - NEXT: The instruction is {{ [ 0 - 9a - f ]+ }}: pacda x0 , x1
700675// CHECK - NEXT: The 0 instructions th at write to the affected registers after any authentication are:
701- paciasp
702676 adr x3 , 1f
703677 br x3
7046781 :
705679 ldr x2 , [ x0 ]
706680 ldr x2 , [ x0 ]
707681 pacda x0 , x1
708- autiasp
709682 ret
710683 .size bad_transition_check_then_check_nocfg , . - bad_transition_check_then_check_nocfg
711684
0 commit comments