| @@ -148,15 +148,13 @@ static int rxkad_secure_packet_auth(const struct rxrpc_call *call, · 147 unmodified lines |
| 148 | 148 | u32 data_size, |
| 149 | 149 | void *sechdr) |
| 150 | 150 | { |
| 151 | | − struct rxrpc_skb_priv *sp; |
| 151 | + struct rxrpc_skb_priv *sp = rxrpc_skb(skb); |
| 152 | 152 | SKCIPHER_REQUEST_ON_STACK(req, call->conn->cipher); |
| 153 | 153 | struct rxkad_level1_hdr hdr; |
| 154 | 154 | struct rxrpc_crypt iv; |
| 155 | 155 | struct scatterlist sg; |
| 156 | 156 | u16 check; |
| 157 | 157 | |
| 158 | | − sp = rxrpc_skb(skb); |
| 159 | | − |
| 160 | 158 | _enter(""); |
| 161 | 159 | |
| 162 | 160 | check = sp->hdr.seq ^ call->call_id; |
| @@ -323,6 +321,7 @@ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb, · 160 unmodified lines |
| 323 | 321 | struct rxrpc_crypt iv; |
| 324 | 322 | struct scatterlist sg[16]; |
| 325 | 323 | struct sk_buff *trailer; |
| 324 | + bool aborted; |
| 326 | 325 | u32 data_size, buf; |
| 327 | 326 | u16 check; |
| 328 | 327 | int nsg; |
| @@ -330,7 +329,8 @@ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb, · 1 unmodified line |
| 330 | 329 | _enter(""); |
| 331 | 330 | |
| 332 | 331 | if (len < 8) { |
| 333 | | − rxrpc_abort_call("V1H", call, seq, RXKADSEALEDINCON, -EPROTO); |
| 332 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_1_hdr", "V1H", |
| 333 | + RXKADSEALEDINCON); |
| 334 | 334 | goto protocol_error; |
| 335 | 335 | } |
| 336 | 336 | |
| @@ -355,7 +355,8 @@ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb, · 18 unmodified lines |
| 355 | 355 | |
| 356 | 356 | /* Extract the decrypted packet length */ |
| 357 | 357 | if (skb_copy_bits(skb, offset, &sechdr, sizeof(sechdr)) < 0) { |
| 358 | | − rxrpc_abort_call("XV1", call, seq, RXKADDATALEN, -EPROTO); |
| 358 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_1_len", "XV1", |
| 359 | + RXKADDATALEN); |
| 359 | 360 | goto protocol_error; |
| 360 | 361 | } |
| 361 | 362 | offset += sizeof(sechdr); |
| @@ -368,12 +369,14 @@ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb, · 6 unmodified lines |
| 368 | 369 | check ^= seq ^ call->call_id; |
| 369 | 370 | check &= 0xffff; |
| 370 | 371 | if (check != 0) { |
| 371 | | − rxrpc_abort_call("V1C", call, seq, RXKADSEALEDINCON, -EPROTO); |
| 372 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_1_check", "V1C", |
| 373 | + RXKADSEALEDINCON); |
| 372 | 374 | goto protocol_error; |
| 373 | 375 | } |
| 374 | 376 | |
| 375 | 377 | if (data_size > len) { |
| 376 | | − rxrpc_abort_call("V1L", call, seq, RXKADDATALEN, -EPROTO); |
| 378 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_1_datalen", "V1L", |
| 379 | + RXKADDATALEN); |
| 377 | 380 | goto protocol_error; |
| 378 | 381 | } |
| 379 | 382 | |
| @@ -381,8 +384,8 @@ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb, · 1 unmodified line |
| 381 | 384 | return 0; |
| 382 | 385 | |
| 383 | 386 | protocol_error: |
| 384 | | − rxrpc_send_abort_packet(call); |
| 385 | | − _leave(" = -EPROTO"); |
| 387 | + if (aborted) |
| 388 | + rxrpc_send_abort_packet(call); |
| 386 | 389 | return -EPROTO; |
| 387 | 390 | |
| 388 | 391 | nomem: |
| @@ -403,6 +406,7 @@ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb, · 14 unmodified lines |
| 403 | 406 | struct rxrpc_crypt iv; |
| 404 | 407 | struct scatterlist _sg[4], *sg; |
| 405 | 408 | struct sk_buff *trailer; |
| 409 | + bool aborted; |
| 406 | 410 | u32 data_size, buf; |
| 407 | 411 | u16 check; |
| 408 | 412 | int nsg; |
| @@ -410,7 +414,8 @@ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb, · 1 unmodified line |
| 410 | 414 | _enter(",{%d}", skb->len); |
| 411 | 415 | |
| 412 | 416 | if (len < 8) { |
| 413 | | − rxrpc_abort_call("V2H", call, seq, RXKADSEALEDINCON, -EPROTO); |
| 417 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_2_hdr", "V2H", |
| 418 | + RXKADSEALEDINCON); |
| 414 | 419 | goto protocol_error; |
| 415 | 420 | } |
| 416 | 421 | |
| @@ -445,7 +450,8 @@ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb, · 28 unmodified lines |
| 445 | 450 | |
| 446 | 451 | /* Extract the decrypted packet length */ |
| 447 | 452 | if (skb_copy_bits(skb, offset, &sechdr, sizeof(sechdr)) < 0) { |
| 448 | | − rxrpc_abort_call("XV2", call, seq, RXKADDATALEN, -EPROTO); |
| 453 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_2_len", "XV2", |
| 454 | + RXKADDATALEN); |
| 449 | 455 | goto protocol_error; |
| 450 | 456 | } |
| 451 | 457 | offset += sizeof(sechdr); |
| @@ -458,12 +464,14 @@ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb, · 6 unmodified lines |
| 458 | 464 | check ^= seq ^ call->call_id; |
| 459 | 465 | check &= 0xffff; |
| 460 | 466 | if (check != 0) { |
| 461 | | − rxrpc_abort_call("V2C", call, seq, RXKADSEALEDINCON, -EPROTO); |
| 467 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_2_check", "V2C", |
| 468 | + RXKADSEALEDINCON); |
| 462 | 469 | goto protocol_error; |
| 463 | 470 | } |
| 464 | 471 | |
| 465 | 472 | if (data_size > len) { |
| 466 | | − rxrpc_abort_call("V2L", call, seq, RXKADDATALEN, -EPROTO); |
| 473 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_2_datalen", "V2L", |
| 474 | + RXKADDATALEN); |
| 467 | 475 | goto protocol_error; |
| 468 | 476 | } |
| 469 | 477 | |
| @@ -471,8 +479,8 @@ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb, · 1 unmodified line |
| 471 | 479 | return 0; |
| 472 | 480 | |
| 473 | 481 | protocol_error: |
| 474 | | − rxrpc_send_abort_packet(call); |
| 475 | | − _leave(" = -EPROTO"); |
| 482 | + if (aborted) |
| 483 | + rxrpc_send_abort_packet(call); |
| 476 | 484 | return -EPROTO; |
| 477 | 485 | |
| 478 | 486 | nomem: |
| @@ -491,6 +499,7 @@ static int rxkad_verify_packet(struct rxrpc_call *call, struct sk_buff *skb, · 12 unmodified lines |
| 491 | 499 | SKCIPHER_REQUEST_ON_STACK(req, call->conn->cipher); |
| 492 | 500 | struct rxrpc_crypt iv; |
| 493 | 501 | struct scatterlist sg; |
| 502 | + bool aborted; |
| 494 | 503 | u16 cksum; |
| 495 | 504 | u32 x, y; |
| 496 | 505 | |
| @@ -522,10 +531,9 @@ static int rxkad_verify_packet(struct rxrpc_call *call, struct sk_buff *skb, · 25 unmodified lines |
| 522 | 531 | cksum = 1; /* zero checksums are not permitted */ |
| 523 | 532 | |
| 524 | 533 | if (cksum != expected_cksum) { |
| 525 | | − rxrpc_abort_call("VCK", call, seq, RXKADSEALEDINCON, -EPROTO); |
| 526 | | − rxrpc_send_abort_packet(call); |
| 527 | | − _leave(" = -EPROTO [csum failed]"); |
| 528 | | − return -EPROTO; |
| 534 | + aborted = rxrpc_abort_eproto(call, skb, "rxkad_csum", "VCK", |
| 535 | + RXKADSEALEDINCON); |
| 536 | + goto protocol_error; |
| 529 | 537 | } |
| 530 | 538 | |
| 531 | 539 | switch (call->conn->params.security_level) { |
| @@ -538,6 +546,11 @@ static int rxkad_verify_packet(struct rxrpc_call *call, struct sk_buff *skb, · 6 unmodified lines |
| 538 | 546 | default: |
| 539 | 547 | return -ENOANO; |
| 540 | 548 | } |
| 549 | + |
| 550 | +protocol_error: |
| 551 | + if (aborted) |
| 552 | + rxrpc_send_abort_packet(call); |
| 553 | + return -EPROTO; |
| 541 | 554 | } |
| 542 | 555 | |
| 543 | 556 | /* |
| @@ -754,11 +767,13 @@ static int rxkad_respond_to_challenge(struct rxrpc_connection *conn, · 210 unmodified lines |
| 754 | 767 | struct rxkad_response resp |
| 755 | 768 | __attribute__((aligned(8))); /* must be aligned for crypto */ |
| 756 | 769 | struct rxrpc_skb_priv *sp = rxrpc_skb(skb); |
| 770 | + const char *eproto; |
| 757 | 771 | u32 version, nonce, min_level, abort_code; |
| 758 | 772 | int ret; |
| 759 | 773 | |
| 760 | 774 | _enter("{%d,%x}", conn->debug_id, key_serial(conn->params.key)); |
| 761 | 775 | |
| 776 | + eproto = tracepoint_string("chall_no_key"); |
| 762 | 777 | abort_code = RX_PROTOCOL_ERROR; |
| 763 | 778 | if (!conn->params.key) |
| 764 | 779 | goto protocol_error; |
| @@ -768,6 +783,7 @@ static int rxkad_respond_to_challenge(struct rxrpc_connection *conn, · 3 unmodified lines |
| 768 | 783 | if (ret < 0) |
| 769 | 784 | goto other_error; |
| 770 | 785 | |
| 786 | + eproto = tracepoint_string("chall_short"); |
| 771 | 787 | abort_code = RXKADPACKETSHORT; |
| 772 | 788 | if (skb_copy_bits(skb, sizeof(struct rxrpc_wire_header), |
| 773 | 789 | &challenge, sizeof(challenge)) < 0) |
| @@ -780,6 +796,7 @@ static int rxkad_respond_to_challenge(struct rxrpc_connection *conn, · 6 unmodified lines |
| 780 | 796 | _proto("Rx CHALLENGE %%%u { v=%u n=%u ml=%u }", |
| 781 | 797 | sp->hdr.serial, version, nonce, min_level); |
| 782 | 798 | |
| 799 | + eproto = tracepoint_string("chall_ver"); |
| 783 | 800 | abort_code = RXKADINCONSISTENCY; |
| 784 | 801 | if (version != RXKAD_VERSION) |
| 785 | 802 | goto protocol_error; |
| @@ -814,6 +831,7 @@ static int rxkad_respond_to_challenge(struct rxrpc_connection *conn, · 28 unmodified lines |
| 814 | 831 | return rxkad_send_response(conn, &sp->hdr, &resp, token->kad); |
| 815 | 832 | |
| 816 | 833 | protocol_error: |
| 834 | + trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, eproto); |
| 817 | 835 | ret = -EPROTO; |
| 818 | 836 | other_error: |
| 819 | 837 | *_abort_code = abort_code; |
| @@ -824,19 +842,23 @@ other_error: · 4 unmodified lines |
| 824 | 842 | * decrypt the kerberos IV ticket in the response |
| 825 | 843 | */ |
| 826 | 844 | static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, |
| 845 | + struct sk_buff *skb, |
| 827 | 846 | void *ticket, size_t ticket_len, |
| 828 | 847 | struct rxrpc_crypt *_session_key, |
| 829 | 848 | time_t *_expiry, |
| 830 | 849 | u32 *_abort_code) |
| 831 | 850 | { |
| 832 | 851 | struct skcipher_request *req; |
| 852 | + struct rxrpc_skb_priv *sp = rxrpc_skb(skb); |
| 833 | 853 | struct rxrpc_crypt iv, key; |
| 834 | 854 | struct scatterlist sg[1]; |
| 835 | 855 | struct in_addr addr; |
| 836 | 856 | unsigned int life; |
| 857 | + const char *eproto; |
| 837 | 858 | time_t issue, now; |
| 838 | 859 | bool little_endian; |
| 839 | 860 | int ret; |
| 861 | + u32 abort_code; |
| 840 | 862 | u8 *p, *q, *name, *end; |
| 841 | 863 | |
| 842 | 864 | _enter("{%d},{%x}", conn->debug_id, key_serial(conn->server_key)); |
| @@ -847,10 +869,10 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, · 4 unmodified lines |
| 847 | 869 | if (ret < 0) { |
| 848 | 870 | switch (ret) { |
| 849 | 871 | case -EKEYEXPIRED: |
| 850 | | − *_abort_code = RXKADEXPIRED; |
| 872 | + abort_code = RXKADEXPIRED; |
| 851 | 873 | goto other_error; |
| 852 | 874 | default: |
| 853 | | − *_abort_code = RXKADNOAUTH; |
| 875 | + abort_code = RXKADNOAUTH; |
| 854 | 876 | goto other_error; |
| 855 | 877 | } |
| 856 | 878 | } |
| @@ -875,11 +897,12 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, · 18 unmodified lines |
| 875 | 897 | p = ticket; |
| 876 | 898 | end = p + ticket_len; |
| 877 | 899 | |
| 878 | | −#define Z(size) \ |
| 900 | +#define Z(field) \ |
| 879 | 901 | ({ \ |
| 880 | 902 | u8 *__str = p; \ |
| 903 | + eproto = tracepoint_string("rxkad_bad_"#field); \ |
| 881 | 904 | q = memchr(p, 0, end - p); \ |
| 882 | | − if (!q || q - p > (size)) \ |
| 905 | + if (!q || q - p > (field##_SZ)) \ |
| 883 | 906 | goto bad_ticket; \ |
| 884 | 907 | for (; p < q; p++) \ |
| 885 | 908 | if (!isprint(*p)) \ |
| @@ -894,17 +917,18 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, · 8 unmodified lines |
| 894 | 917 | p++; |
| 895 | 918 | |
| 896 | 919 | /* extract the authentication name */ |
| 897 | | − name = Z(ANAME_SZ); |
| 920 | + name = Z(ANAME); |
| 898 | 921 | _debug("KIV ANAME: %s", name); |
| 899 | 922 | |
| 900 | 923 | /* extract the principal's instance */ |
| 901 | | − name = Z(INST_SZ); |
| 924 | + name = Z(INST); |
| 902 | 925 | _debug("KIV INST : %s", name); |
| 903 | 926 | |
| 904 | 927 | /* extract the principal's authentication domain */ |
| 905 | | − name = Z(REALM_SZ); |
| 928 | + name = Z(REALM); |
| 906 | 929 | _debug("KIV REALM: %s", name); |
| 907 | 930 | |
| 931 | + eproto = tracepoint_string("rxkad_bad_len"); |
| 908 | 932 | if (end - p < 4 + 8 + 4 + 2) |
| 909 | 933 | goto bad_ticket; |
| 910 | 934 | |
| @@ -939,13 +963,13 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, · 28 unmodified lines |
| 939 | 963 | |
| 940 | 964 | /* check the ticket is in date */ |
| 941 | 965 | if (issue > now) { |
| 942 | | − *_abort_code = RXKADNOAUTH; |
| 966 | + abort_code = RXKADNOAUTH; |
| 943 | 967 | ret = -EKEYREJECTED; |
| 944 | 968 | goto other_error; |
| 945 | 969 | } |
| 946 | 970 | |
| 947 | 971 | if (issue < now - life) { |
| 948 | | − *_abort_code = RXKADEXPIRED; |
| 972 | + abort_code = RXKADEXPIRED; |
| 949 | 973 | ret = -EKEYEXPIRED; |
| 950 | 974 | goto other_error; |
| 951 | 975 | } |
| @@ -953,18 +977,20 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, · 1 unmodified line |
| 953 | 977 | *_expiry = issue + life; |
| 954 | 978 | |
| 955 | 979 | /* get the service name */ |
| 956 | | − name = Z(SNAME_SZ); |
| 980 | + name = Z(SNAME); |
| 957 | 981 | _debug("KIV SNAME: %s", name); |
| 958 | 982 | |
| 959 | 983 | /* get the service instance name */ |
| 960 | | − name = Z(INST_SZ); |
| 984 | + name = Z(INST); |
| 961 | 985 | _debug("KIV SINST: %s", name); |
| 962 | 986 | return 0; |
| 963 | 987 | |
| 964 | 988 | bad_ticket: |
| 965 | | − *_abort_code = RXKADBADTICKET; |
| 989 | + trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, eproto); |
| 990 | + abort_code = RXKADBADTICKET; |
| 966 | 991 | ret = -EPROTO; |
| 967 | 992 | other_error: |
| 993 | + *_abort_code = abort_code; |
| 968 | 994 | return ret; |
| 969 | 995 | temporary_error: |
| 970 | 996 | return ret; |
| @@ -1017,6 +1043,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 46 unmodified lines |
| 1017 | 1043 | __attribute__((aligned(8))); /* must be aligned for crypto */ |
| 1018 | 1044 | struct rxrpc_skb_priv *sp = rxrpc_skb(skb); |
| 1019 | 1045 | struct rxrpc_crypt session_key; |
| 1046 | + const char *eproto; |
| 1020 | 1047 | time_t expiry; |
| 1021 | 1048 | void *ticket; |
| 1022 | 1049 | u32 abort_code, version, kvno, ticket_len, level; |
| @@ -1025,6 +1052,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 2 unmodified lines |
| 1025 | 1052 | |
| 1026 | 1053 | _enter("{%d,%x}", conn->debug_id, key_serial(conn->server_key)); |
| 1027 | 1054 | |
| 1055 | + eproto = tracepoint_string("rxkad_rsp_short"); |
| 1028 | 1056 | abort_code = RXKADPACKETSHORT; |
| 1029 | 1057 | if (skb_copy_bits(skb, sizeof(struct rxrpc_wire_header), |
| 1030 | 1058 | &response, sizeof(response)) < 0) |
| @@ -1038,14 +1066,17 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 7 unmodified lines |
| 1038 | 1066 | _proto("Rx RESPONSE %%%u { v=%u kv=%u tl=%u }", |
| 1039 | 1067 | sp->hdr.serial, version, kvno, ticket_len); |
| 1040 | 1068 | |
| 1069 | + eproto = tracepoint_string("rxkad_rsp_ver"); |
| 1041 | 1070 | abort_code = RXKADINCONSISTENCY; |
| 1042 | 1071 | if (version != RXKAD_VERSION) |
| 1043 | 1072 | goto protocol_error; |
| 1044 | 1073 | |
| 1074 | + eproto = tracepoint_string("rxkad_rsp_tktlen"); |
| 1045 | 1075 | abort_code = RXKADTICKETLEN; |
| 1046 | 1076 | if (ticket_len < 4 || ticket_len > MAXKRB5TICKETLEN) |
| 1047 | 1077 | goto protocol_error; |
| 1048 | 1078 | |
| 1079 | + eproto = tracepoint_string("rxkad_rsp_unkkey"); |
| 1049 | 1080 | abort_code = RXKADUNKNOWNKEY; |
| 1050 | 1081 | if (kvno >= RXKAD_TKT_TYPE_KERBEROS_V5) |
| 1051 | 1082 | goto protocol_error; |
| @@ -1056,12 +1087,13 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 4 unmodified lines |
| 1056 | 1087 | if (!ticket) |
| 1057 | 1088 | goto temporary_error; |
| 1058 | 1089 | |
| 1090 | + eproto = tracepoint_string("rxkad_tkt_short"); |
| 1059 | 1091 | abort_code = RXKADPACKETSHORT; |
| 1060 | 1092 | if (skb_copy_bits(skb, sizeof(struct rxrpc_wire_header), |
| 1061 | 1093 | ticket, ticket_len) < 0) |
| 1062 | 1094 | goto protocol_error_free; |
| 1063 | 1095 | |
| 1064 | | − ret = rxkad_decrypt_ticket(conn, ticket, ticket_len, &session_key, |
| 1096 | + ret = rxkad_decrypt_ticket(conn, skb, ticket, ticket_len, &session_key, |
| 1065 | 1097 | &expiry, _abort_code); |
| 1066 | 1098 | if (ret < 0) |
| 1067 | 1099 | goto temporary_error_free; |
| @@ -1070,6 +1102,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 2 unmodified lines |
| 1070 | 1102 | * response */ |
| 1071 | 1103 | rxkad_decrypt_response(conn, &response, &session_key); |
| 1072 | 1104 | |
| 1105 | + eproto = tracepoint_string("rxkad_rsp_param"); |
| 1073 | 1106 | abort_code = RXKADSEALEDINCON; |
| 1074 | 1107 | if (ntohl(response.encrypted.epoch) != conn->proto.epoch) |
| 1075 | 1108 | goto protocol_error_free; |
| @@ -1080,6 +1113,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 4 unmodified lines |
| 1080 | 1113 | csum = response.encrypted.checksum; |
| 1081 | 1114 | response.encrypted.checksum = 0; |
| 1082 | 1115 | rxkad_calc_response_checksum(&response); |
| 1116 | + eproto = tracepoint_string("rxkad_rsp_csum"); |
| 1083 | 1117 | if (response.encrypted.checksum != csum) |
| 1084 | 1118 | goto protocol_error_free; |
| 1085 | 1119 | |
| @@ -1088,11 +1122,15 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 2 unmodified lines |
| 1088 | 1122 | struct rxrpc_call *call; |
| 1089 | 1123 | u32 call_id = ntohl(response.encrypted.call_id[i]); |
| 1090 | 1124 | |
| 1125 | + eproto = tracepoint_string("rxkad_rsp_callid"); |
| 1091 | 1126 | if (call_id > INT_MAX) |
| 1092 | 1127 | goto protocol_error_unlock; |
| 1093 | 1128 | |
| 1129 | + eproto = tracepoint_string("rxkad_rsp_callctr"); |
| 1094 | 1130 | if (call_id < conn->channels[i].call_counter) |
| 1095 | 1131 | goto protocol_error_unlock; |
| 1132 | + |
| 1133 | + eproto = tracepoint_string("rxkad_rsp_callst"); |
| 1096 | 1134 | if (call_id > conn->channels[i].call_counter) { |
| 1097 | 1135 | call = rcu_dereference_protected( |
| 1098 | 1136 | conn->channels[i].call, |
| @@ -1104,10 +1142,12 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, · 5 unmodified lines |
| 1104 | 1142 | } |
| 1105 | 1143 | spin_unlock(&conn->channel_lock); |
| 1106 | 1144 | |
| 1145 | + eproto = tracepoint_string("rxkad_rsp_seq"); |
| 1107 | 1146 | abort_code = RXKADOUTOFSEQUENCE; |
| 1108 | 1147 | if (ntohl(response.encrypted.inc_nonce) != conn->security_nonce + 1) |
| 1109 | 1148 | goto protocol_error_free; |
| 1110 | 1149 | |
| 1150 | + eproto = tracepoint_string("rxkad_rsp_level"); |
| 1111 | 1151 | abort_code = RXKADLEVELFAIL; |
| 1112 | 1152 | level = ntohl(response.encrypted.level); |
| 1113 | 1153 | if (level > RXRPC_SECURITY_ENCRYPT) |
| @@ -1130,8 +1170,8 @@ protocol_error_unlock: · 16 unmodified lines |
| 1130 | 1170 | protocol_error_free: |
| 1131 | 1171 | kfree(ticket); |
| 1132 | 1172 | protocol_error: |
| 1173 | + trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, eproto); |
| 1133 | 1174 | *_abort_code = abort_code; |
| 1134 | | − _leave(" = -EPROTO [%d]", abort_code); |
| 1135 | 1175 | return -EPROTO; |
| 1136 | 1176 | |
| 1137 | 1177 | temporary_error_free: |