WARNING: line length of 87 exceeds 80 columns #47: FILE: net/quic/crypto.c:210: +static void *quic_crypto_skcipher_mem_alloc(struct crypto_skcipher *tfm, u32 mask_size, WARNING: line length of 83 exceeds 80 columns #48: FILE: net/quic/crypto.c:211: + u8 **iv, struct skcipher_request **req) WARNING: line length of 82 exceeds 80 columns #59: FILE: net/quic/crypto.c:222: + len += crypto_skcipher_alignmask(tfm) & ~(crypto_tfm_ctx_alignment() - 1); WARNING: line length of 83 exceeds 80 columns #67: FILE: net/quic/crypto.c:230: + *iv = (u8 *)PTR_ALIGN(mem + mask_size, crypto_skcipher_alignmask(tfm) + 1); WARNING: line length of 100 exceeds 80 columns #81: FILE: net/quic/crypto.c:244: +static int quic_crypto_header_encrypt(struct crypto_skcipher *tfm, struct sk_buff *skb, bool chacha) WARNING: line length of 85 exceeds 80 columns #112: FILE: net/quic/crypto.c:275: + memcpy((chacha ? iv : mask), skb->data + cb->number_offset + QUIC_PN_MAX_LEN, WARNING: line length of 90 exceeds 80 columns #137: FILE: net/quic/crypto.c:300: + *p = (u8)(*p ^ (mask[0] & (((*p & QUIC_HEADER_FORM_BIT) == QUIC_HEADER_FORM_BIT) ? WARNING: line length of 85 exceeds 80 columns #138: FILE: net/quic/crypto.c:301: + QUIC_LONG_HEADER_MASK : QUIC_SHORT_HEADER_MASK))); WARNING: line length of 96 exceeds 80 columns #157: FILE: net/quic/crypto.c:320: + * Once header protection is removed, the packet number is decoded by finding the packet WARNING: line length of 96 exceeds 80 columns #158: FILE: net/quic/crypto.c:321: + * number value that is closest to the next expected packet. The next expected packet is WARNING: line length of 100 exceeds 80 columns #173: FILE: net/quic/crypto.c:336: +static int quic_crypto_header_decrypt(struct crypto_skcipher *tfm, struct sk_buff *skb, bool chacha) WARNING: line length of 90 exceeds 80 columns #202: FILE: net/quic/crypto.c:365: + *p = (u8)(*p ^ (mask[0] & (((*p & QUIC_HEADER_FORM_BIT) == QUIC_HEADER_FORM_BIT) ? WARNING: line length of 85 exceeds 80 columns #203: FILE: net/quic/crypto.c:366: + QUIC_LONG_HEADER_MASK : QUIC_SHORT_HEADER_MASK))); WARNING: line length of 84 exceeds 80 columns #261: FILE: net/quic/crypto.c:424: +static int quic_crypto_payload_encrypt(struct crypto_aead *tfm, struct sk_buff *skb, WARNING: line length of 83 exceeds 80 columns #294: FILE: net/quic/crypto.c:457: + * The associated data, A, for the AEAD is the contents of the QUIC header, WARNING: line length of 85 exceeds 80 columns #295: FILE: net/quic/crypto.c:458: + * starting from the first byte of either the short or long header, up to and WARNING: line length of 88 exceeds 80 columns #298: FILE: net/quic/crypto.c:461: + * The nonce, N, is formed by combining the packet protection IV with the packet WARNING: line length of 87 exceeds 80 columns #299: FILE: net/quic/crypto.c:462: + * number. The 62 bits of the reconstructed QUIC packet number in network byte WARNING: line length of 90 exceeds 80 columns #300: FILE: net/quic/crypto.c:463: + * order are left-padded with zeros to the size of the IV. The exclusive OR of the WARNING: line length of 90 exceeds 80 columns #315: FILE: net/quic/crypto.c:478: + aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, quic_crypto_done, skb); WARNING: line length of 83 exceeds 80 columns #319: FILE: net/quic/crypto.c:482: + /* Will complete asynchronously; set destructor to free context. */ WARNING: line length of 84 exceeds 80 columns #332: FILE: net/quic/crypto.c:495: +static int quic_crypto_payload_decrypt(struct crypto_aead *tfm, struct sk_buff *skb, WARNING: line length of 90 exceeds 80 columns #371: FILE: net/quic/crypto.c:534: + aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, quic_crypto_done, skb); WARNING: line length of 89 exceeds 80 columns #403: FILE: net/quic/crypto.c:583: +/* Encrypts a QUIC packet before transmission. This function performs AEAD encryption of WARNING: line length of 90 exceeds 80 columns #404: FILE: net/quic/crypto.c:584: + * the packet payload and applies header protection. It handles key phase tracking and key WARNING: line length of 92 exceeds 80 columns #417: FILE: net/quic/crypto.c:597: + /* Packet payload is already encrypted (e.g., resumed from async), proceed to header WARNING: line length of 94 exceeds 80 columns #423: FILE: net/quic/crypto.c:603: + /* If a key update is pending and this is the first packet using the new key, save the WARNING: line length of 85 exceeds 80 columns #424: FILE: net/quic/crypto.c:604: + * current time. Later used to clear old keys after some time has passed (see WARNING: line length of 84 exceeds 80 columns #439: FILE: net/quic/crypto.c:619: +/* Decrypts a QUIC packet after reception. This function removes header protection, WARNING: line length of 84 exceeds 80 columns #440: FILE: net/quic/crypto.c:620: + * decrypts the payload, and processes any key updates if the key phase bit changes. WARNING: line length of 92 exceeds 80 columns #451: FILE: net/quic/crypto.c:631: + /* Payload was decrypted asynchronously. Proceed with parsing packet number and key WARNING: line length of 93 exceeds 80 columns #469: FILE: net/quic/crypto.c:649: + * The Key Phase bit allows a recipient to detect a change in keying material without WARNING: line length of 90 exceeds 80 columns #470: FILE: net/quic/crypto.c:650: + * needing to receive the first packet that triggered the change. An endpoint that WARNING: line length of 93 exceeds 80 columns #471: FILE: net/quic/crypto.c:651: + * notices a changed Key Phase bit updates keys and decrypts the packet that contains WARNING: line length of 83 exceeds 80 columns #477: FILE: net/quic/crypto.c:657: + if (!cb->backlog) /* Key update must be done in process context. */ WARNING: line length of 81 exceeds 80 columns #479: FILE: net/quic/crypto.c:659: + err = quic_crypto_key_update(crypto); /* Perform a key update. */ WARNING: line length of 86 exceeds 80 columns #494: FILE: net/quic/crypto.c:674: + /* When using the old keys can not decrypt the packets, the peer might WARNING: line length of 85 exceeds 80 columns #495: FILE: net/quic/crypto.c:675: + * start another key_update. Thus, clear the last key_pending so that WARNING: line length of 83 exceeds 80 columns #508: FILE: net/quic/crypto.c:688: + * An endpoint MUST retain old keys until it has successfully unprotected a WARNING: line length of 81 exceeds 80 columns #509: FILE: net/quic/crypto.c:689: + * packet sent using the new keys. An endpoint SHOULD retain old keys for WARNING: line length of 90 exceeds 80 columns #514: FILE: net/quic/crypto.c:694: + if (time && jiffies_to_usecs(jiffies) - time >= crypto->key_update_time) { WARNING: line length of 87 exceeds 80 columns #548: FILE: net/quic/crypto.c:1006: + * The Retry Integrity Tag is a 128-bit field that is computed as the output of WARNING: line length of 88 exceeds 80 columns #551: FILE: net/quic/crypto.c:1009: + * - The secret key, K, is 128 bits equal to 0xbe0c690b9f66575a1d766b54e368c84e. WARNING: line length of 90 exceeds 80 columns #556: FILE: net/quic/crypto.c:1014: + * The Retry Pseudo-Packet is not sent over the wire. It is computed by taking the WARNING: line length of 89 exceeds 80 columns #557: FILE: net/quic/crypto.c:1015: + * transmitted Retry packet, removing the Retry Integrity Tag, and prepending the WARNING: line length of 91 exceeds 80 columns #558: FILE: net/quic/crypto.c:1016: + * two following fields: ODCID Length + Original Destination Connection ID (ODCID). WARNING: line length of 95 exceeds 80 columns #571: FILE: net/quic/crypto.c:1029: + pseudo_retry = quic_crypto_aead_mem_alloc(tfm, plen + QUIC_TAG_LEN, &iv, &req, &sg, 1); WARNING: line length of 87 exceeds 80 columns #596: FILE: net/quic/crypto.c:1054: + * Builds a token with the format: [client address][timestamp][original DCID][auth tag] WARNING: line length of 85 exceeds 80 columns #598: FILE: net/quic/crypto.c:1056: + * Encrypts the token (excluding the first flag byte) using AES-GCM with a key and IV WARNING: line length of 84 exceeds 80 columns #599: FILE: net/quic/crypto.c:1057: + * derived via HKDF. The original DCID is stored to be recovered later from a Client WARNING: line length of 89 exceeds 80 columns #600: FILE: net/quic/crypto.c:1058: + * Initial packet. Ensures the token is bound to the client address and time, preventing WARNING: line length of 83 exceeds 80 columns #605: FILE: net/quic/crypto.c:1063: +int quic_crypto_generate_token(struct quic_crypto *crypto, void *addr, u32 addrlen, WARNING: line length of 82 exceeds 80 columns #606: FILE: net/quic/crypto.c:1064: + struct quic_conn_id *conn_id, u8 *token, u32 *tlen) WARNING: line length of 95 exceeds 80 columns #620: FILE: net/quic/crypto.c:1078: + err = quic_crypto_keys_derive(crypto->secret_tfm, &srt, &k, &i, NULL, QUIC_VERSION_V1); WARNING: line length of 81 exceeds 80 columns #631: FILE: net/quic/crypto.c:1089: + retry_token = quic_crypto_aead_mem_alloc(tfm, len, &tx_iv, &req, &sg, 1); WARNING: line length of 89 exceeds 80 columns #659: FILE: net/quic/crypto.c:1117: + * Decrypts the token using derived key and IV. Checks that the decrypted address matches WARNING: line length of 85 exceeds 80 columns #660: FILE: net/quic/crypto.c:1118: + * the provided address, validates the embedded timestamp against current time with a WARNING: line length of 87 exceeds 80 columns #664: FILE: net/quic/crypto.c:1122: + * Returns 0 if the token is valid, -EINVAL if invalid, or another negative error code. WARNING: line length of 81 exceeds 80 columns #666: FILE: net/quic/crypto.c:1124: +int quic_crypto_verify_token(struct quic_crypto *crypto, void *addr, u32 addrlen, WARNING: line length of 95 exceeds 80 columns #684: FILE: net/quic/crypto.c:1142: + err = quic_crypto_keys_derive(crypto->secret_tfm, &srt, &k, &i, NULL, QUIC_VERSION_V1); WARNING: line length of 81 exceeds 80 columns #695: FILE: net/quic/crypto.c:1153: + retry_token = quic_crypto_aead_mem_alloc(tfm, len, &rx_iv, &req, &sg, 1); WARNING: line length of 83 exceeds 80 columns #755: FILE: net/quic/crypto.h:75: +int quic_crypto_generate_token(struct quic_crypto *crypto, void *addr, u32 addrlen, WARNING: line length of 83 exceeds 80 columns #756: FILE: net/quic/crypto.h:76: + struct quic_conn_id *conn_id, u8 *token, u32 *tlen); WARNING: line length of 81 exceeds 80 columns #759: FILE: net/quic/crypto.h:79: +int quic_crypto_verify_token(struct quic_crypto *crypto, void *addr, u32 addrlen, total: 0 errors, 64 warnings, 0 checks, 712 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 6c35eb2a25df ("quic: add crypto packet encryption and decryption") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 64 warnings, 0 checks, 712 lines checked