Message ID | 20230929180305.work.590-kees@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp69886vqb; Fri, 29 Sep 2023 15:15:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwBR2KDjkv17c4Ggq3u69uVUmYKgFnm6aNGDgWXaRPC9tESUAA/YkaS5vHSDboorwHh0gO X-Received: by 2002:a17:902:c94d:b0:1c5:d063:b70e with SMTP id i13-20020a170902c94d00b001c5d063b70emr4670660pla.53.1696025749554; Fri, 29 Sep 2023 15:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696025749; cv=none; d=google.com; s=arc-20160816; b=usG807SaHsGsua5cO/V+9TTM6zbKTTlZa2excGw6bOCfWUURyWEA7rEJuS8rzb+G5c VO7MsywOC2lL18ARqULSpKokbkGcqVx7VCnHmHxlVrifULuZ9G9bw91WiAqhV3Y30bhU Dttdf+z9kiaA7uc5fzYF3fe1pgxg2ilHcKDsg0Re01iF9JeA/fRWxAywZj5t1zd5b6Yw t6Ps7Yiyg7+LOaQkvUEvoSBbxoMSQUZvxWZPCLPJV5SKxcQmiyGKRbzhc4fk5+kWDd/X R+v94ynsGBXb30epxjmwVIBuZxfHVebRMpzNeAaJfDaC263XKvNHV5/UBto7wYa4HJ7g iTZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=q/QLRqHS2L1NZ+5Mittg0t9KUpHsT5gMIELAAOGClyI=; fh=geCJDGsZI+jvTjjKON5aFl4+xiXUBrAl8g7xApax7nY=; b=NI1vMFL56Ht10KFZ9o1KPfiXCSzPEShUIX0T3UOFPgOAx6XZ99Z11YLd1A5TDw77ac UH/7GkvWNw9BgVAv9/7J/6dUcMBh9UB+T7cGSkbWGIp7sofoTa6JFFf9MICbB2CB54KH Dcs14EMcVKW278lIPsOwKdimw0vnGa1F50WQLY7XLouGn1w2mj+ZZ8Mqlx+nyfAIRJRw ne4vrheSkObrNCsTX5rFkl5j+xU12SuLCxbi5OwGqy92I+dYujcdRqsJjZI48u8GTWwd ViuCPRoTxEUccbCokKGtJhprSCdXmxmDLURXLAxlCUbsCCpMl+PCCz5WwPbl6b0inKWY EU7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CnWJmFgD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b12-20020a170903228c00b001c753d6b95fsi349493plh.315.2023.09.29.15.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 15:15:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CnWJmFgD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 869BC80C5906; Fri, 29 Sep 2023 11:05:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233552AbjI2SFR (ORCPT <rfc822;pwkd43@gmail.com> + 19 others); Fri, 29 Sep 2023 14:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233833AbjI2SFE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 29 Sep 2023 14:05:04 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BCF3CE6 for <linux-kernel@vger.kernel.org>; Fri, 29 Sep 2023 11:04:33 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-690ba63891dso11434415b3a.2 for <linux-kernel@vger.kernel.org>; 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=fj+LkW08kRKJQK0BVzUmehhsC2a/AMtSSanrFtkmGoYxy2dSnVPLSRJDpJA/4q42rQ MEFx5P1xQxRSaZ2cjf9mWt1KbbyjSLzh+sRHrXbAYdcjkJRCZQPMJZ9lBqpNuOFDM1HW 6RlQwZHSM5iMHbfRY27mRl3c+y++2w+LAx1CuOHxMl75clikdWhyZctJ0E77HqMBDV1m vB6Lt2myPXjdDFNqmrI4BseUEvB/fhsrGrxPQ3TmqMUuwDEq7t1ZCJY5WnKFeQxrUviB 4sgvKHAAbzQ2/OVz5lWDVIm8sn5bCaLue/y0FhnzFFzWyHXF2dryt5F5lF6uAw4J6v2I hPvQ== X-Gm-Message-State: AOJu0YwsRzSseQdEOQ+Y3q/npATdkHSfqmCwG/g2AnTN6YEiQf8kFKAL 3NdrOEUs4Meqpcj+PF8LqFNYUA== 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 <keescook@chromium.org> To: Jason Gunthorpe <jgg@ziepe.ca> Cc: Kees Cook <keescook@chromium.org>, Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>, Leon Romanovsky <leon@kernel.org>, =?utf-8?q?H=C3=A5kon_Bugge?= <haakon.bugge@oracle.com>, Avihai Horon <avihaih@nvidia.com>, Anand Khoje <anand.a.khoje@oracle.com>, Mark Bloch <mbloch@nvidia.com>, Christian Benvenuti <benve@cisco.com>, Nelson Escobar <neescoba@cisco.com>, Bernard Metzler <bmt@zurich.ibm.com>, Bart Van Assche <bvanassche@acm.org>, "Gustavo A. R. Silva" <gustavoars@kernel.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Tom Rix <trix@redhat.com>, Patrisious Haddad <phaddad@nvidia.com>, Chuck Lever <chuck.lever@oracle.com>, Tom Talpey <tom@talpey.com>, wangjianli <wangjianli@cdjrlc.com>, 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Content-Transfer-Encoding: 8bit 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=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 29 Sep 2023 11:05:31 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778411896727312541 X-GMAIL-MSGID: 1778411896727312541 |
Series |
RDMA: Annotate structs with __counted_by
|
|
Message
Kees Cook
Sept. 29, 2023, 6:04 p.m. UTC
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(-)
Comments
On Fri, 29 Sep 2023 11:04:23 -0700, Kees Cook wrote: > 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 > > [...] Applied, thanks! [1/7] RDMA: Annotate struct rdma_hw_stats with __counted_by https://git.kernel.org/rdma/rdma/c/4755dc6f29597d [2/7] RDMA/core: Annotate struct ib_pkey_cache with __counted_by https://git.kernel.org/rdma/rdma/c/fc424078f50840 [3/7] RDMA/usnic: Annotate struct usnic_uiom_chunk with __counted_by https://git.kernel.org/rdma/rdma/c/ed7c64de622ff9 [4/7] RDMA/siw: Annotate struct siw_pbl with __counted_by https://git.kernel.org/rdma/rdma/c/0bc018b7a7b733 [5/7] IB/srp: Annotate struct srp_fr_pool with __counted_by https://git.kernel.org/rdma/rdma/c/bd8eec5bfa59b5 [6/7] IB/mthca: Annotate struct mthca_icm_table with __counted_by https://git.kernel.org/rdma/rdma/c/2aba54a9e0ead5 [7/7] IB/hfi1: Annotate struct tid_rb_node with __counted_by https://git.kernel.org/rdma/rdma/c/964168970cef5f Best regards,