Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222227/?format=api
{ "id": 2222227, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222227/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260410230300.135631-2-carlos.bilbao@kernel.org/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.1/projects/28/?format=api", "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 }, "msgid": "<20260410230300.135631-2-carlos.bilbao@kernel.org>", "date": "2026-04-10T23:02:59", "name": "[v2,1/2] misc: pci_endpoint_test: validate BAR index in doorbell test", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f13e39252d9d60950a23e4e38f175f96ad421ef5", "submitter": { "id": 93050, "url": "http://patchwork.ozlabs.org/api/1.1/people/93050/?format=api", "name": "Carlos Bilbao (Lambda)", "email": "carlos.bilbao@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260410230300.135631-2-carlos.bilbao@kernel.org/mbox/", "series": [ { "id": 499514, "url": "http://patchwork.ozlabs.org/api/1.1/series/499514/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=499514", "date": "2026-04-10T23:02:59", "name": "misc: pci_endpoint_test: doorbell BAR validation fixes", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499514/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222227/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222227/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-52357-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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=hXY8oKHl;\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-52357-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"hXY8oKHl\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "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 4fssm04yffz1yCx\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 09:03:12 +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 825003012E5D\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 23:03:08 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 13D7A343D7F;\n\tFri, 10 Apr 2026 23:03:07 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E591533F5A9;\n\tFri, 10 Apr 2026 23:03:06 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 6C72FC19424;\n\tFri, 10 Apr 2026 23:03:06 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775862187; cv=none;\n b=U1SCTDhB00H0Siyie0M8Pu2roRr5RwiMPAeZ/lCsXm9e8li665ZBNJDkwHsNbGDdMjlIfJluZmG/hPcoVmPe4oyJ56tYrI6yVFpOnRzAlPlWyDFOwgMtwleliMtaoATBfoztT25CzBsYZ2bUYogi0vkqsTUGvc8GHogxecTiHkw=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775862187; c=relaxed/simple;\n\tbh=RJbHTACYPsKias2m26X60C9BBBMflClnp6hW86zoAqM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=tWGLfJh/tuQ+w3dLFYyQF4tKU/nFOoJpjBPJKYwcMUYXSvaAj51/xODlAI8RUvdf2JHyHvoP8Nma4K/0sIEvy98HsCNPWQjt/BgVGbkStjZkshvzioKKBYKVaoZeb7XdwbEaVCj8hBbNvbKIzBQpve1Qsqk4Y0DkPMW2hIPAhyM=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=hXY8oKHl; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775862186;\n\tbh=RJbHTACYPsKias2m26X60C9BBBMflClnp6hW86zoAqM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=hXY8oKHl4vSwLdY/zGXq3J8T4QwqzBbzvw7Bmgce0Xis94PGGUMm1yhhVaJX/Yzfy\n\t d5ujayv1Jaj4vfL/IvxUBb5eLoEODftvfopZbdZNNtBbrZWlj76BPQy013sF4I4Lj8\n\t dixjTjDCM3Ftx1RCwENUmtVMOkDUk4EMZ/a0w26S2z7MqejWmP91WyUQH8miHbzCCO\n\t 0hzPYG7aKnt78h9nXLlQJbLi1ktNw3rlluiK+dH5cVs9Gx8IXAGh5KOTZpBWxhczYy\n\t sVEQ8PgC+P30NLL3iung2tz4n/RJl8HCfK87zg5hUhYSnUyRpNhH/rviTEAj+PZ2qi\n\t RSBIyQKD8wE2w==", "From": "\"Carlos Bilbao (Lambda)\" <carlos.bilbao@kernel.org>", "To": "mani@kernel.org,\n\tkwilczynski@kernel.org,\n\tkishon@kernel.org,\n\tden@valinux.co.jp", "Cc": "arnd@arndb.de,\n\tgregkh@linuxfoundation.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tbilbao@vt.edu,\n\tCarlos Bilbao <carlos.bilbao@kernel.org>", "Subject": "[PATCH v2 1/2] misc: pci_endpoint_test: validate BAR index in\n doorbell test", "Date": "Fri, 10 Apr 2026 16:02:59 -0700", "Message-ID": "<20260410230300.135631-2-carlos.bilbao@kernel.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260410230300.135631-1-carlos.bilbao@kernel.org>", "References": "<20260410230300.135631-1-carlos.bilbao@kernel.org>", "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: Carlos Bilbao <carlos.bilbao@kernel.org>\n\npci_endpoint_test_doorbell() reads the BAR number directly from an endpoint\ntest register and uses it as an index into test->bar[]. Add a defensive\nbounds check before the dereference: positive values >= PCI_STD_NUM_BARS\nare out of range, and NO_BAR (-1) as a negative signed value would slip\npast an upper-bound-only check.\n\nSigned-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>\n---\n drivers/misc/pci_endpoint_test.c | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c\nindex 74ab5b5b9011..0d0b430de0e8 100644\n--- a/drivers/misc/pci_endpoint_test.c\n+++ b/drivers/misc/pci_endpoint_test.c\n@@ -1089,6 +1089,11 @@ static int pci_endpoint_test_doorbell(struct pci_endpoint_test *test)\n \tpci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_STATUS, 0);\n \n \tbar = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_DB_BAR);\n+\tif (bar < BAR_0 || bar >= PCI_STD_NUM_BARS) {\n+\t\tdev_err(dev, \"BAR %d reported by endpoint out of range [0, %u]\\n\",\n+\t\t\tbar, PCI_STD_NUM_BARS - 1);\n+\t\treturn -EINVAL;\n+\t}\n \n \twritel(data, test->bar[bar] + addr);\n \n", "prefixes": [ "v2", "1/2" ] }