[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <C85081E7-99CB-421F-AA3D-60326A5181EB@gmail.com>
Date: Wed, 21 Sep 2022 02:42:18 -0400
From: comex <comexk@...il.com>
To: Gary Guo <gary@...yguo.net>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Matthew Wilcox <willy@...radead.org>,
Kees Cook <keescook@...omium.org>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Konstantin Shelekhin <k.shelekhin@...ro.com>, ojeda@...nel.org,
ark.email@...il.com, bjorn3_gh@...tonmail.com, bobo1239@....de,
bonifaido@...il.com, Boqun Feng <boqun.feng@...il.com>,
davidgow@...gle.com, dev@...lasmohrin.de, dsosnowski@...snowski.pl,
foxhlchen@...il.com, geofft@...reload.com,
gregkh@...uxfoundation.org, jarkko@...nel.org,
john.m.baublitz@...il.com, leseulartichaut@...il.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
me@...enk.de, milan@...verde.com, mjmouse9999@...il.com,
patches@...ts.linux.dev, rust-for-linux@...r.kernel.org,
thesven73@...il.com, viktor@...ar.de,
Andreas Hindborg <andreas.hindborg@....com>
Subject: Re: [PATCH v9 12/27] rust: add `kernel` crate
> On Sep 20, 2022, at 6:39 PM, Gary Guo <gary@...yguo.net> wrote:
>
> It should be noted however, atomic context is not something that a
> token can represent. You can only use tokens to restrict what you *can*
> do, but not what you *can't* do. There is no negative reasoning with
> tokens, you can't create a function that can only be called when you
> don't have token.
On the other hand, it ought to be feasible to implement that kind of ’negative reasoning' as a custom lint. It might not work as well as something built into the language, but it should work decently well, and could serve as a prototype for a future built-in feature.
Powered by blists - more mailing lists