From patchwork Fri Sep 29 18:04:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 13404726 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF64A66676 for ; Fri, 29 Sep 2023 18:04:34 +0000 (UTC) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA85CE5 for ; Fri, 29 Sep 2023 11:04:33 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-690ba63891dso11434414b3a.2 for ; Fri, 29 Sep 2023 11:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696010673; x=1696615473; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q/QLRqHS2L1NZ+5Mittg0t9KUpHsT5gMIELAAOGClyI=; b=CnWJmFgDThESeBVrWvndRL7qevdh1LedSSoza2qpzq1NbzCsE5Z+V/JhhSt/4s6hhV a2ZsuSY7lMs1NtZF9tAuBQb/v+ysmbMW0PonovPnMYgGc8bMnpjHz6hKuJTriaMMlcRP BaiWCIy6iTKVZP6TB+a682fT2tPZUp4ZrqpHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696010673; x=1696615473; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q/QLRqHS2L1NZ+5Mittg0t9KUpHsT5gMIELAAOGClyI=; b=sHdcNs3bdF2ZHGdms83RgXj7wjHgmdlyllMT1GyAY48/R7KGbe2bBaauE1hEAI5BII I+D8Leur7Vb8V+1YaF4Ntm6G6CtzyL4D6PKTwxPLEWOSdE5W2oKLo7zxbPnHqjv7TAKn MbxFaluIPW0EhpIHpljw6KRPaCfSI2x0xOcMiglSytrzgbxp2EuGHd/9PdaTFxwQPSJO H3hFrEbEM0aW4Bvb7eufWxcSHwsfjUt0r98PF5MTkLjUNjdl6KfzBvxN5TdNW5VTTZ9z umJY8MNBy7rsYOA5OHGm91NX+8yiaOwi6LSrdTDnWk8lALkxT6w/lN0mxUrhpbsFeGHr qhwg== X-Gm-Message-State: AOJu0YxFX686nYTHal/tCR/Ws41bfNK8WsYg4Tiw196uLXZj3lTuN9a/ 9bOd+c3r4Ftb4cypb9sGtwj5Yg== X-Google-Smtp-Source: AGHT+IGac3Y+OxZ1Rfapit3zv2uDFcPVgfD1mFi/owGzR0eAKACpnMWPiW7mh4tp2DCOwfeg6BIUyQ== X-Received: by 2002:a05:6a20:7d92:b0:15c:fa48:2c09 with SMTP id v18-20020a056a207d9200b0015cfa482c09mr6069263pzj.15.1696010672901; Fri, 29 Sep 2023 11:04:32 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id gp15-20020a17090adf0f00b002790ded9c6dsm1743374pjb.31.2023.09.29.11.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 11:04:32 -0700 (PDT) From: Kees Cook To: Jason Gunthorpe Cc: Kees Cook , Dennis Dalessandro , Leon Romanovsky , =?utf-8?q?H=C3=A5kon_Bugge?= , Avihai Horon , Anand Khoje , Mark Bloch , Christian Benvenuti , Nelson Escobar , Bernard Metzler , Bart Van Assche , "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Tom Rix , Patrisious Haddad , Chuck Lever , Tom Talpey , wangjianli , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 0/7] RDMA: Annotate structs with __counted_by Date: Fri, 29 Sep 2023 11:04:23 -0700 Message-Id: <20230929180305.work.590-kees@kernel.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1121; i=keescook@chromium.org; h=from:subject:message-id; bh=/4LMpXENw48q7fWMpYL2O5Uv9CCph1q6zJBZxS3OiTQ=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBlFxGtfNnwAB6/IhVqdJxC7ZgaTcIkDx4p62U8K 94/n2sAm5mJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZRcRrQAKCRCJcvTf3G3A JrPDD/9G/FXBBVcXylRtWq4GKt0j7nGB3Sb1K6AcSlCVxVFBRy+nxwfYQQZr4xtXxsWvyMHA3GO an6tniLg3oW6KAqeWlyoWTPCgAB03CJi+G+hDiHHCov15sOhpiT+456fNXINz4dWnuT1qjDocWu qVgb/JbcWJ1yknRDBwLxZj8BxmPFaaI0fAk3CBQ1uQGoIuXnpCcwPc3K4LnXUr291JEhvyG1GYm 3AoB/bQL+pdZ+iiLJ8Yy/zYhFRiaJJjemNfx4dgeoeVtFYw/5lBL12b3cig48nQ5OYmhzuKV6DH J+ivtBBRlahSdgzv3pA7WYfvof4aT9lQPMFU8DAhQwTPxyBIQBQGJcmO6kpVvOYl/RV3fMyaG4O AHoNT3KByS2bpG0ExZn6Uudg9PdpU4oZDnBycx9eyVau5Fo5w3iNBmOaONQqpSV8sm21McFz7bc PlWSe1ghKr/6+gz6B7c6xuGI5XUCPAgmfeoZK0ImUfSKKq4dMNZQgXsbUKst/+9wQuU6Xes3YQo Th5dJxMb43142TKmxCpqx3Rjz4V3QoMFZuIzOmqjdgLuZ4/h/zPhD/7BIsty0C49KtvuHqctwCa 6mxhmeKDdB6fYNPos0YZ/L7sWYNIQGJxNq4XbGnQijtT1dR331wWDNTg+3OFKZr5O6Et2PaYOjJ nEyQXsh KrnMXw1g== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Hi, This annotates several structures with the coming __counted_by attribute for bounds checking of flexible arrays at run-time. For more details, see commit dd06e72e68bc ("Compiler Attributes: Add __counted_by macro"). Thanks! -Kees Kees Cook (7): RDMA: Annotate struct rdma_hw_stats with __counted_by RDMA/core: Annotate struct ib_pkey_cache with __counted_by RDMA/usnic: Annotate struct usnic_uiom_chunk with __counted_by RDMA/siw: Annotate struct siw_pbl with __counted_by IB/srp: Annotate struct srp_fr_pool with __counted_by IB/mthca: Annotate struct mthca_icm_table with __counted_by IB/hfi1: Annotate struct tid_rb_node with __counted_by drivers/infiniband/core/cache.c | 2 +- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 2 +- drivers/infiniband/hw/mthca/mthca_memfree.h | 2 +- drivers/infiniband/hw/usnic/usnic_uiom.h | 2 +- drivers/infiniband/sw/siw/siw.h | 2 +- drivers/infiniband/ulp/srp/ib_srp.h | 2 +- include/rdma/ib_verbs.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)