** Changed in: linux (Ubuntu Oracular)
       Status: In Progress => Won't Fix

** Changed in: linux (Ubuntu Noble)
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2103496

Title:
  Introduce configfs-based interface for gpio-aggregator

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Jammy:
  Won't Fix
Status in linux source package in Noble:
  Fix Committed
Status in linux source package in Oracular:
  Won't Fix
Status in linux source package in Plucky:
  Fix Committed

Bug description:
  [ Impact ]

  The existing 'new_device' interface for gpio-aggregator
  (https://docs.kernel.org/admin-guide/gpio/gpio-aggregator.html) has several
  limitations:

  * No way to determine when GPIO aggregator creation is complete.
  * No way to retrieve errors when creating a GPIO aggregator.
  * No way to trace a GPIO line of an aggregator back to its corresponding
    physical device.
  * The 'new_device' echo does not indicate which virtual gpiochip<N> was
    created.
  * No way to assign names to GPIO lines exported through an aggregator.

  While the GPIO aggregator concept is useful for resource isolation, these
  limitations currently hinder its practical effectiveness. This patch series
  addresses all those issues.

  [ Fix ]

  For Plucky, I cherry-picked the v6 patch series [1] to include it in the
  Release before the main patch series reached linux-next. See the APPLIED
  announcement [2]. As a result, the code differs slightly from the v7 patch
  series [3], which later made it to linux-next and was used for backporting to
  Oracular/Noble as explained below. However, since there are no
  substantial differences between v6 and v7, I do not intend to modify Plucky to
  match v7.

  For Plucky, apply 18 patches in total:

    * Already applied 12 patches below via [2].
      -  Applied [PATCH 1/3] to [PATCH 3/3] from [4], which had landed in 
linux-next.
      -  Applied [PATCH 2/9] to [PATCH 9/9] from [1], which had been under 
review.
      -  Added a "UBUNTU: [Config]" commit for the new config option 
CONFIG_DEV_SYNC_PROBE.

      Note:
      - [4] is a preparatory patch series for [1].
      - [PATCH 1/9] from [1] was already picked and landed in mainline.

    * Cherry-pick 6 commits (follow-up fixes) from gpio/for-next 
(brgl/linux.git)
      eebfcb98cdc0 ("gpio: aggregator: fix "_sysfs" prefix check in 
gpio_aggregator_make_group()")
      2e8636ca3400 ("gpio: aggregator: Fix gpio_aggregator_line_alloc() 
checking")
      db1baf69e563 ("gpio: aggregator: Return an error if there are no GPIOs in 
gpio_aggregator_parse()")
      05b43de95add ("gpio: aggregator: Fix error code in 
gpio_aggregator_activate()")
      d945ff52642d ("gpio: aggregator: Fix leak in gpio_aggregator_parse()")
      290ffcfe3042 ("selftests: gpio: gpio-aggregator: add a test case for 
_sysfs prefix reservation")

  For Oracular, apply 19 patches in total:

    * Cherry-pick 3 commits from mainline, as prerequisite for the main patch 
series:
      eb5ab6ffb4ca ("gpio: introduce utilities for synchronous fake device 
creation")
      22dec5aa596e ("gpio: aggregator: simplify aggr_parse() with scoped 
bitmap")
      12f65d120350 ("gpio: aggregator: protect driver attr handlers against 
module unload")
    * Cherry-pick 9 commits from linux-next:
      7a56efeabffd ("gpio: aggregator: reorder functions to prepare for 
configfs introduction")
      7616dd97ae22 ("gpio: aggregator: unify function naming")
      88fe1d1a646b ("gpio: aggregator: add gpio_aggregator_{alloc,free}()")
      86f162e73d2d ("gpio: aggregator: introduce basic configfs interface")
      4ec2315d7fab ("gpio: aggregator: rename 'name' to 'key' in 
gpio_aggregator_parse()")
      83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy 
sysfs to configfs")
      0269c768de1b ("gpio: aggregator: cancel deferred probe for devices 
created via configfs")
      10f94d092bba ("Documentation: gpio: document configfs interface for 
gpio-aggregator")
      6d7f0c1103ef ("selftests: gpio: add test cases for gpio-aggregator")
    * Cherry-pick 6 commits (follow-up fixes) from gpio/for-next 
(brgl/linux.git)
      eebfcb98cdc0 ("gpio: aggregator: fix "_sysfs" prefix check in 
gpio_aggregator_make_group()")
      2e8636ca3400 ("gpio: aggregator: Fix gpio_aggregator_line_alloc() 
checking")
      db1baf69e563 ("gpio: aggregator: Return an error if there are no GPIOs in 
gpio_aggregator_parse()")
      05b43de95add ("gpio: aggregator: Fix error code in 
gpio_aggregator_activate()")
      d945ff52642d ("gpio: aggregator: Fix leak in gpio_aggregator_parse()")
      290ffcfe3042 ("selftests: gpio: gpio-aggregator: add a test case for 
_sysfs prefix reservation")
    * Add a "UBUNTU: [Config]" commit for the new config option 
CONFIG_DEV_SYNC_PROBE.

  For Noble, apply 20 patches in total:

    * Cherry-pick 4 commits from mainline, as prerequisite for the main patch 
series:
      eb5ab6ffb4ca ("gpio: introduce utilities for synchronous fake device 
creation")
      d12a82848eac ("bitmap: Define a cleanup function for bitmaps")
      22dec5aa596e ("gpio: aggregator: simplify aggr_parse() with scoped 
bitmap")
      12f65d120350 ("gpio: aggregator: protect driver attr handlers against 
module unload")
    * Cherry-pick 9 commits from linux-next:
      7a56efeabffd ("gpio: aggregator: reorder functions to prepare for 
configfs introduction")
      7616dd97ae22 ("gpio: aggregator: unify function naming")
      88fe1d1a646b ("gpio: aggregator: add gpio_aggregator_{alloc,free}()")
      86f162e73d2d ("gpio: aggregator: introduce basic configfs interface")
      4ec2315d7fab ("gpio: aggregator: rename 'name' to 'key' in 
gpio_aggregator_parse()")
      83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy 
sysfs to configfs")
      0269c768de1b ("gpio: aggregator: cancel deferred probe for devices 
created via configfs")
      10f94d092bba ("Documentation: gpio: document configfs interface for 
gpio-aggregator")
      6d7f0c1103ef ("selftests: gpio: add test cases for gpio-aggregator")
    * Cherry-pick 6 commits (follow-up fixes) from gpio/for-next 
(brgl/linux.git)
      eebfcb98cdc0 ("gpio: aggregator: fix "_sysfs" prefix check in 
gpio_aggregator_make_group()")
      2e8636ca3400 ("gpio: aggregator: Fix gpio_aggregator_line_alloc() 
checking")
      db1baf69e563 ("gpio: aggregator: Return an error if there are no GPIOs in 
gpio_aggregator_parse()")
      05b43de95add ("gpio: aggregator: Fix error code in 
gpio_aggregator_activate()")
      d945ff52642d ("gpio: aggregator: Fix leak in gpio_aggregator_parse()")
      290ffcfe3042 ("selftests: gpio: gpio-aggregator: add a test case for 
_sysfs prefix reservation")
    * Add a "UBUNTU: [Config]" commit for the new config option 
CONFIG_DEV_SYNC_PROBE.

  [1] 
https://lore.kernel.org/all/20250315164123.1855142-1-koichiro....@canonical.com/
  [2] https://lists.ubuntu.com/archives/kernel-team/2025-March/158315.html
  [3] 
https://lore.kernel.org/all/20250407043019.4105613-1-koichiro....@canonical.com/
  [4] 
https://lore.kernel.org/all/20250221133501.2203897-1-koichiro....@canonical.com/
  [5] https://lore.kernel.org/all/cover.1744452787.git.dan.carpen...@linaro.org/

  [ Test Plan ]

  Run kselftest.

  [ Where problems could occur ]

  Any regressions would only impact users who load and use the
  gpio-aggregator module, potentially causing issues like memory leaks or
  system crashes.

  [ Other Info ]

  v1->v2 changes:
    - Omitted backports for Jammy. See the comment:
      https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2103496/comments/4
    - Included the follow-up fixes from brgl/linux.git gpio/for-next branch:
      https://lore.kernel.org/all/cover.1744452787.git.dan.carpen...@linaro.org/
      That's why v2 submission includes Plucky as its target.
      Note that it has not landed into linux-next as of this writing.
    - Fixed messed-up git commit trailers for:
      * [SRU][O][PATCH 01/13]
      * [SRU][O][PATCH 04/13]
      * [SRU][N][PATCH 01/14]
     (* [SRU][J][PATCH 01/12]) # v2 does not include backport for Jammy
     (* [SRU][J][PATCH 04/12]) # v2 does not include backport for Jammy
     (* [SRU][J][PATCH 09/12]) # v2 does not include backport for Jammy

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2103496/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to