{"id":2234738,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2234738/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260508031710.514574-6-alistair.francis@wdc.com/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/1.2/projects/28/?format=json","name":"Linux PCI development","link_name":"linux-pci","list_id":"linux-pci.vger.kernel.org","list_email":"linux-pci@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260508031710.514574-6-alistair.francis@wdc.com>","list_archive_url":null,"date":"2026-05-08T03:16:57","name":"[05/18] rust: add bindings for hash.h","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"fa341d0fa7002e96f164e9369f5df41f763680e0","submitter":{"id":64571,"url":"http://patchwork.ozlabs.org/api/1.2/people/64571/?format=json","name":"Alistair Francis","email":"alistair23@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260508031710.514574-6-alistair.francis@wdc.com/mbox/","series":[{"id":503312,"url":"http://patchwork.ozlabs.org/api/1.2/series/503312/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=503312","date":"2026-05-08T03:16:52","name":"lib: Rust implementation of SPDM","version":1,"mbox":"http://patchwork.ozlabs.org/series/503312/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2234738/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2234738/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-pci+bounces-54160-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=KAatbeSc;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-54160-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"KAatbeSc\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.178","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBZ8C1rmfz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 13:18:35 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 4D39C3017E69\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 03:18:05 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id DD6842EA498;\n\tFri,  8 May 2026 03:18:03 +0000 (UTC)","from mail-pl1-f178.google.com (mail-pl1-f178.google.com\n [209.85.214.178])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id A89102E7F0A\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 03:18:02 +0000 (UTC)","by mail-pl1-f178.google.com with SMTP id\n d9443c01a7336-2baef9f5ecdso1757365ad.1\n        for <linux-pci@vger.kernel.org>; Thu, 07 May 2026 20:18:02 -0700 (PDT)","from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2baf1eafa62sm3220685ad.74.2026.05.07.20.17.54\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 07 May 2026 20:18:01 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778210283; cv=none;\n b=tqLgxcRkGiE8bySEkgpJfnahgrZvIL2Gq2U8tQgeq81WB+QpTJoOTsqYpnrKcT5puXkz26RjgeX35ijr3rz+jUmLPmdmvvoI+EfnmwKYirjnLidbe0uNsrZfVpxwO8Ba7b7caCr3H6igZf1jeiyDy+dxMAuuUUp074mfi8+6dgg=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778210283; c=relaxed/simple;\n\tbh=UJEK4Y1OhR+erOD7cv7y2WCfgF+MLsewlMFQ+GFgGZ4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=L9JfjY2VyD/VCP8A5OXyc6ETkSktfxRU6Tr3xA6IMz4WFkCE8U7eOfNLwP9z+Nz5o8rQ45kBRMQNBGm+AmFYfOFXKu38LBvGrXg1aVYZHuBIhQYLNqurAmckwswd8uX1RG8atS51VdgXWVpsphk2yKvuSgnCTdw5ntgC0rjf1jM=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=KAatbeSc; arc=none smtp.client-ip=209.85.214.178","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1778210282; x=1778815082;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=+Ea9CQEMVfcK8wVMyEmmugnqFDUXoP6diCNpcvc9CFc=;\n        b=KAatbeScxFvridVADwksd9gbbG5nTUFqMbvunoN8z7guixrtGU+2LMpreIEfZO3dPn\n         SRESKEXFzKT7MFT3ZBAP5qX1HLz2Ccsy+x+dMHTcUtsp4ZefKx8qcVoMgnUKraeRh+hX\n         vAp2zw6Px8fbeUZYEHLJS6BwnXRDnb/L/dYkWbMJipLe3xB6Np8w0xW3yQw88dIHDkBR\n         yr+R4e18z9zsWZ08WvvKsGRXF5p3cXDhf3hUsPX5SHmvClRBX0ET1g0G+PNMTi7wds3/\n         joFS4xDU6anoh420k3HKoVqii8cGDNW06uUO0Iifq3Qrr2R/oeB+PnmppBm3+go+lWLG\n         sN6Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1778210282; x=1778815082;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=+Ea9CQEMVfcK8wVMyEmmugnqFDUXoP6diCNpcvc9CFc=;\n        b=oxnhcET+QLDxphviOYzXwGgjHts8kXnlg+wo1BgKe22/krSSPtOwNNgrt9aSYdWKzT\n         VEND6DDt7XNxcs41JNaNnWYua7cYkK0brVHNiSG0ODQktZdu82NZ5Fduvu1Sc7OWJQai\n         fg/qrA/zMmLfJYYjCJx6B3X+cOEk5tOR2wMfypc32HDvsvERdPpFQysjif3oNzjMC1lJ\n         MvGVQX548nc7CS4zHYt05HFqMFicQMiYedBx3xkeZMDsOzgG+pvo10qFgC+Ne3KPcnVC\n         4bf/jUJ3Kv3JFriiaVCjvccaCNFIFKNlWO1j1l5g9Zp+HvUnglGMTuZ+jGJr2wkX5jsO\n         106A==","X-Forwarded-Encrypted":"i=1;\n AFNElJ/ec4C1sI2/6iEI8wFcXtgT/zymh2bBL7B1ZDq4xnAt908VVIBJJB0f7DiH83fcxYBl9kSaGLFQK4g=@vger.kernel.org","X-Gm-Message-State":"AOJu0YzeluYbkEmQdypc2lO0pSJhipnbOJP7sxVfNhks4lIMFRXevjkG\n\t7e6KI47lIobpc03nABV0GCyXRUkh2i/A6aKBfY4j1aP0NHISnkIfqJgT","X-Gm-Gg":"Acq92OFSYii91qdeic7WXrZcv9+TQ1C+gxf6AaLD6Mt187Mf3CgDkz91JV5Igd2zlCD\n\tV1IZvXGRhs2QfrPDDURoN8Cf1ZeBHfd6pMwUGiYaT+PXucmh+LQG+JD2kT2pFZFMdQfzjXKVlcb\n\tEhEeJVeVVSJDQSYO7IAMAHwFcJ42DRiNnos4UGEfP2MIfPL9gVT9JDGP9clSkosTfTslmBh5BcT\n\t/BoI5SehwgmJ1pkpojKfz2+ZkI7CmTPee/eHU3b3UFqpFX/K/uPBs9d8CiAI0OfzGkVqp0K/8DT\n\tWj7LsXeKZ7nHn6aA+nEEeXqRpRTWgJnOkk8Mqa1cfSqLb5BtZrHh33eas9myn3SOMjgvJOwLGSw\n\te58A/OJA5il4TO6WgT1WLYvyOAh52uZNxJuuUj5FFFQGjlvUOpFvKlBkZerThoTvs6iBmsKkT5o\n\tpp+MeiyspOqxjDhWRZKSSuEUeTdzYwMB+IcE+mxcnL","X-Received":"by 2002:a17:903:1a88:b0:2b9:6458:1a2c with SMTP id\n d9443c01a7336-2ba78f54deamr115997225ad.13.1778210281888;\n        Thu, 07 May 2026 20:18:01 -0700 (PDT)","From":"alistair23@gmail.com","X-Google-Original-From":"alistair.francis@wdc.com","To":"alistair@alistair23.me,\n\tlinux-kernel@vger.kernel.org,\n\tlukas@wunner.de,\n\tJonathan.Cameron@huawei.com,\n\tbhelgaas@google.com,\n\trust-for-linux@vger.kernel.org,\n\takpm@linux-foundation.org,\n\tlinux-cxl@vger.kernel.org,\n\tdjbw@kernel.org,\n\tlinux-pci@vger.kernel.org","Cc":"alex.gaynor@gmail.com,\n\twilfred.mallawa@wdc.com,\n\tgary@garyguo.net,\n\tbjorn3_gh@protonmail.com,\n\tbenno.lossin@proton.me,\n\taliceryhl@google.com,\n\tboqun.feng@gmail.com,\n\ta.hindborg@kernel.org,\n\ttmgross@umich.edu,\n\tojeda@kernel.org,\n\talistair23@gmail.com,\n\tAlistair Francis <alistair.francis@wdc.com>","Subject":"[PATCH 05/18] rust: add bindings for hash.h","Date":"Fri,  8 May 2026 13:16:57 +1000","Message-ID":"<20260508031710.514574-6-alistair.francis@wdc.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260508031710.514574-1-alistair.francis@wdc.com>","References":"<20260508031710.514574-1-alistair.francis@wdc.com>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"From: Alistair Francis <alistair.francis@wdc.com>\n\nMake the functions crypto_shash_descsize(), crypto_shash_digestsize()\nand crypto_free_shash() available to Rust.\n\nSigned-off-by: Alistair Francis <alistair.francis@wdc.com>\n---\n rust/bindings/bindings_helper.h |  2 ++\n rust/helpers/hash.c             | 18 ++++++++++++++++++\n rust/helpers/helpers.c          |  1 +\n 3 files changed, 21 insertions(+)\n create mode 100644 rust/helpers/hash.c","diff":"diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h\nindex 446dbeaf0866..d73142078240 100644\n--- a/rust/bindings/bindings_helper.h\n+++ b/rust/bindings/bindings_helper.h\n@@ -30,6 +30,7 @@\n \n #include <linux/acpi.h>\n #include <linux/gpu_buddy.h>\n+#include <crypto/hash.h>\n #include <drm/drm_device.h>\n #include <drm/drm_drv.h>\n #include <drm/drm_file.h>\n@@ -60,6 +61,7 @@\n #include <linux/file.h>\n #include <linux/firmware.h>\n #include <linux/fs.h>\n+#include <linux/hash.h>\n #include <linux/i2c.h>\n #include <linux/interrupt.h>\n #include <linux/io-pgtable.h>\ndiff --git a/rust/helpers/hash.c b/rust/helpers/hash.c\nnew file mode 100644\nindex 000000000000..23a63618a370\n--- /dev/null\n+++ b/rust/helpers/hash.c\n@@ -0,0 +1,18 @@\n+// SPDX-License-Identifier: GPL-2.0\n+\n+#include <crypto/hash.h>\n+\n+__rust_helper unsigned int rust_helper_crypto_shash_descsize(struct crypto_shash *tfm)\n+{\n+\treturn crypto_shash_descsize(tfm);\n+}\n+\n+__rust_helper unsigned int rust_helper_crypto_shash_digestsize(struct crypto_shash *tfm)\n+{\n+\treturn crypto_shash_digestsize(tfm);\n+}\n+\n+__rust_helper void rust_helper_crypto_free_shash(struct crypto_shash *tfm)\n+{\n+\tcrypto_free_shash(tfm);\n+}\ndiff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c\nindex 625921e27dfb..6372e14f8419 100644\n--- a/rust/helpers/helpers.c\n+++ b/rust/helpers/helpers.c\n@@ -60,6 +60,7 @@\n #include \"dma-resv.c\"\n #include \"drm.c\"\n #include \"err.c\"\n+#include \"hash.c\"\n #include \"irq.c\"\n #include \"fs.c\"\n #include \"gpu.c\"\n","prefixes":["05/18"]}