Cover Letter Detail
Show a cover letter.
GET /api/1.1/covers/2228932/?format=api
{ "id": 2228932, "url": "http://patchwork.ozlabs.org/api/1.1/covers/2228932/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/cover/20260427135841.96266-1-tzungbi@kernel.org/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/1.1/projects/42/?format=api", "name": "Linux GPIO development", "link_name": "linux-gpio", "list_id": "linux-gpio.vger.kernel.org", "list_email": "linux-gpio@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260427135841.96266-1-tzungbi@kernel.org>", "date": "2026-04-27T13:58:32", "name": "[v9,0/9] drivers/base: Introduce revocable", "submitter": { "id": 83557, "url": "http://patchwork.ozlabs.org/api/1.1/people/83557/?format=api", "name": "Tzung-Bi Shih", "email": "tzungbi@kernel.org" }, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/cover/20260427135841.96266-1-tzungbi@kernel.org/mbox/", "series": [ { "id": 501655, "url": "http://patchwork.ozlabs.org/api/1.1/series/501655/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=501655", "date": "2026-04-27T13:58:32", "name": "drivers/base: Introduce revocable", "version": 9, "mbox": "http://patchwork.ozlabs.org/series/501655/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/2228932/comments/", "headers": { "Return-Path": "\n <linux-gpio+bounces-35573-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-gpio@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=sfvN5dqc;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35573-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=\"sfvN5dqc\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g44xy33Dvz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 00:02:14 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 923C7302AD29\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 13:59:30 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B02DE3D090B;\n\tMon, 27 Apr 2026 13:59:29 +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 6C7613CEBBC;\n\tMon, 27 Apr 2026 13:59:29 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 70E6FC2BCB4;\n\tMon, 27 Apr 2026 13:59:25 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777298369; cv=none;\n b=DRQ3bQ0/sbZCKonYBJ4M+o4uzWVKYWIwWGCOlD3CQRtJaR/VacjbwL98biKPEUeKkXCM2pvyYR/9JUXdi3x+79/BYAdlZHlF2OmSR1luK9/M9K5QmaXNuqeHOh60Ib+3Rv8nuVGnmIvbs9DcF2zGsl9nvVrAH3TA9hpGnyOvwDQ=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777298369; c=relaxed/simple;\n\tbh=lLNZlNo4AbW+zXp5BcjsajFSNEqcY1uPQqOOFXgHf0Y=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=C2CuRO1l3FwNRBWgYI1xDzzIM6qvde2reUpntrTn+Jk1AkulZDU86BBl3HC8uBvD77VwVqt9RwrNbtTGQ9amfWcDpJbze0+dPEfWa/o1MBTd3Cg7ASp1FMkGnJa0Gx5Y1AVdb8S6qU3EzF7vVJ7Lt1e5504aPBJSfdqSuSjRKSs=", "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=sfvN5dqc; 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=1777298369;\n\tbh=lLNZlNo4AbW+zXp5BcjsajFSNEqcY1uPQqOOFXgHf0Y=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=sfvN5dqcc6cm3QEMsdLfkDDeKgf6mSl7DHBeNFFfoF860jJv6fyK7RuGx1q1VaZYS\n\t 1sr6cm43dF+xsp1/6F5JCdoitdq57Gh+agORN5+QdUY39fjkJ3LSZlt0Su/5AqhQ0u\n\t Fw98dgry7KVEfexzcKj0EKsbJVRjs/Wybm/Y2ydDn4plXuZwKIxpa6J0NzLmcRrM4X\n\t 28IFzIdJgRsNjkCtD7Vd1yGrEmLu/moUPgkZyOvD6VmqWIzwuWmuP5FiSXU6Ev5zJS\n\t nux/tYpMncLAx3rondyRmEUghb/15fwe4ShgDPASKgNJR+si+tUEdGcD0Y+2E8QK28\n\t TVkyIAbcZeqJA==", "From": "Tzung-Bi Shih <tzungbi@kernel.org>", "To": "Arnd Bergmann <arnd@arndb.de>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tBartosz Golaszewski <brgl@kernel.org>,\n\tLinus Walleij <linusw@kernel.org>", "Cc": "Benson Leung <bleung@chromium.org>,\n\ttzungbi@kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tchrome-platform@lists.linux.dev,\n\tdriver-core@lists.linux.dev,\n\tlinux-doc@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tDanilo Krummrich <dakr@kernel.org>,\n\tJonathan Corbet <corbet@lwn.net>,\n\tShuah Khan <shuah@kernel.org>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tWolfram Sang <wsa+renesas@sang-engineering.com>,\n\tJason Gunthorpe <jgg@nvidia.com>,\n\tJohan Hovold <johan@kernel.org>,\n\t\"Paul E . McKenney\" <paulmck@kernel.org>,\n\tDan Williams <dan.j.williams@intel.com>", "Subject": "[PATCH v9 0/9] drivers/base: Introduce revocable", "Date": "Mon, 27 Apr 2026 21:58:32 +0800", "Message-ID": "<20260427135841.96266-1-tzungbi@kernel.org>", "X-Mailer": "git-send-email 2.51.0", "Precedence": "bulk", "X-Mailing-List": "linux-gpio@vger.kernel.org", "List-Id": "<linux-gpio.vger.kernel.org>", "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "This series introduces the \"revocable\" mechanism, a synchronization\nprimitive designed to prevent Use-After-Free errors.\n\n- Patch 1 introduces the revocable which is an implementation of ideas\n from the talk [1].\n\n- Patch 2 adds KUnit test cases.\n\n- Patches 3 to 7 transitions the UAF prevention logic within the GPIO\n core (gpiolib) to use the \"revocable\" mechanism.\n\n The existing code aims to prevent UAF issues when the underlying GPIO\n chip is removed. They replace that custom logic with the generic\n \"revocable\" API, which is designed to handle such lifecycle\n dependencies. There should be no changes in behavior.\n\n- Patches 8 to 9 uses \"revocable\" mechanism to fix an UAF in\n cros_ec_chardev driver. Alternatively, [2] is a series for fixing the\n same issue without using \"revocable\".\n\nSince v9, there are two ways to manage the resource provider handle.\n- Embedded allocation: patches 3 to 7 might be the potential user.\n- Dynamic allocation: patches 8 to 9 might be the potential user.\n\n[1] https://lpc.events/event/17/contributions/1627/\n[2] https://lore.kernel.org/all/20260427134659.95181-1-tzungbi@kernel.org\n\n---\nv9:\n- Rebase onto v7.1-rc1.\n- Remove the selftests patch as it makes less sense to test revocable\n APIs via kselftests.\n- Merge patches 7 to 11 from\n https://lore.kernel.org/all/20260213092958.864411-1-tzungbi@kernel.org\n into the series.\n- Merge patch from\n https://lore.kernel.org/all/20250923075302.591026-5-tzungbi@kernel.org\n- Merge patch from\n https://lore.kernel.org/all/20250912081718.3827390-6-tzungbi@kernel.org\n\nv8: https://lore.kernel.org/all/20260213092307.858908-1-tzungbi@kernel.org\n- Rework on the revocable APIs. See changelog in [PATCH v8 1/3] for details.\n\nv7: https://lore.kernel.org/all/20260116080235.350305-1-tzungbi@kernel.org\n- Rebase onto next-20260115.\n\nv6: https://lore.kernel.org/all/20251106152330.11733-1-tzungbi@kernel.org\n- Rebase onto next-20251106.\n- Separate revocable core and use cases.\n\nv5: https://lore.kernel.org/all/20251016054204.1523139-1-tzungbi@kernel.org\n- Rebase onto next-20251015.\n- Add more context about the PoC.\n- Support multiple revocable providers in the PoC.\n\nv4: https://lore.kernel.org/all/20250923075302.591026-1-tzungbi@kernel.org\n- Rebase onto next-20250922.\n- Remove the 5th patch from v3.\n- Add fops replacement PoC in 5th - 7th patches.\n\nv3: https://lore.kernel.org/all/20250912081718.3827390-1-tzungbi@kernel.org\n- Rebase onto https://lore.kernel.org/all/20250828083601.856083-1-tzungbi@kernel.org\n and next-20250912.\n- The 4th patch changed accordingly.\n\nv2: https://lore.kernel.org/all/20250820081645.847919-1-tzungbi@kernel.org\n- Rename \"ref_proxy\" -> \"revocable\".\n- Add test cases in Kunit and selftest.\n\nv1: https://lore.kernel.org/all/20250814091020.1302888-1-tzungbi@kernel.org\n\nTzung-Bi Shih (9):\n revocable: Revocable resource management\n revocable: Add KUnit test cases\n gpio: Add revocable provider handle for struct gpio_chip\n gpio: cdev: Leverage revocable for accessing struct gpio_chip\n gpio: Remove gpio_chip_guard by using revocable\n gpio: Leverage revocable for accessing struct gpio_chip\n gpio: Remove unused `chip` and `srcu` in struct gpio_device\n platform/chrome: Protect cros_ec_device lifecycle with revocable\n platform/chrome: cros_ec_chardev: Consume cros_ec_device via revocable\n\n .../driver-api/driver-model/index.rst | 1 +\n .../driver-api/driver-model/revocable.rst | 384 +++++++++++++++\n MAINTAINERS | 10 +\n drivers/base/Kconfig | 5 +\n drivers/base/Makefile | 5 +-\n drivers/base/revocable.c | 298 +++++++++++\n drivers/base/revocable_test.c | 461 ++++++++++++++++++\n drivers/gpio/gpiolib-cdev.c | 77 ++-\n drivers/gpio/gpiolib-sysfs.c | 31 +-\n drivers/gpio/gpiolib.c | 255 ++++------\n drivers/gpio/gpiolib.h | 28 +-\n drivers/platform/chrome/cros_ec.c | 11 +\n drivers/platform/chrome/cros_ec_chardev.c | 80 ++-\n include/linux/platform_data/cros_ec_proto.h | 3 +\n include/linux/revocable.h | 214 ++++++++\n 15 files changed, 1597 insertions(+), 266 deletions(-)\n create mode 100644 Documentation/driver-api/driver-model/revocable.rst\n create mode 100644 drivers/base/revocable.c\n create mode 100644 drivers/base/revocable_test.c\n create mode 100644 include/linux/revocable.h" }