linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libgpiod][PATCH 0/3] bindings: rust: fix modeling of line_info lifetimes
@ 2023-09-27 16:29 Erik Schilling
  2023-09-27 16:29 ` [libgpiod][PATCH 1/3] bindings: rust: fix soundness of line_info modeling Erik Schilling
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Erik Schilling @ 2023-09-27 16:29 UTC (permalink / raw)
  To: Linux-GPIO; +Cc: Viresh Kumar, Manos Pitsidianakis, Erik Schilling

While reviewing the bindings for thread-safety, I realized that the
bindings did not properly model the lifetimes of non-owned line_info
instances.

This fixes that. It might be a bit might bending. I tried to provide
lengthy comments to clarify what happens.

To: Linux-GPIO <linux-gpio@vger.kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
Erik Schilling (3):
      bindings: rust: fix soundness of line_info modeling
      bindings: rust: allow cloning line::Info -> line::OwnedInfo
      bindings: rust: bump major for libgpiod crate

 bindings/rust/libgpiod/Cargo.toml         |   2 +-
 bindings/rust/libgpiod/src/chip.rs        |  16 +++-
 bindings/rust/libgpiod/src/info_event.rs  |   6 +-
 bindings/rust/libgpiod/src/lib.rs         |   1 +
 bindings/rust/libgpiod/src/line_info.rs   | 138 ++++++++++++++++++++++--------
 bindings/rust/libgpiod/tests/line_info.rs |  53 ++++++++++++
 6 files changed, 171 insertions(+), 45 deletions(-)
---
base-commit: ced90e79217793957b11414f47f8aa8a77c7a2d5
change-id: 20230927-rust-line-info-soundness-14c08e0d26e9

Best regards,
-- 
Erik Schilling <erik.schilling@linaro.org>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-09-29 12:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27 16:29 [libgpiod][PATCH 0/3] bindings: rust: fix modeling of line_info lifetimes Erik Schilling
2023-09-27 16:29 ` [libgpiod][PATCH 1/3] bindings: rust: fix soundness of line_info modeling Erik Schilling
2023-09-28 11:27   ` Viresh Kumar
2023-09-28 12:27     ` Erik Schilling
2023-09-29 10:39       ` Viresh Kumar
2023-09-29 10:58         ` Erik Schilling
2023-09-29 11:02           ` Viresh Kumar
2023-09-28 13:24   ` Erik Schilling
2023-09-29 10:39     ` Viresh Kumar
2023-09-29 11:06       ` Erik Schilling
2023-09-29 10:50     ` Manos Pitsidianakis
2023-09-27 16:29 ` [libgpiod][PATCH 2/3] bindings: rust: allow cloning line::Info -> line::OwnedInfo Erik Schilling
2023-09-28 12:52   ` Erik Schilling
2023-09-29 10:50     ` Viresh Kumar
2023-09-29 11:05       ` Erik Schilling
2023-09-27 16:29 ` [libgpiod][PATCH 3/3] bindings: rust: bump major for libgpiod crate Erik Schilling
2023-09-29 12:43   ` Bartosz Golaszewski
2023-09-29 12:45     ` Erik Schilling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).