From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E2A71C27 for ; Wed, 21 Sep 2022 06:42:24 +0000 (UTC) Received: by mail-qk1-f170.google.com with SMTP id g2so3374791qkk.1 for ; Tue, 20 Sep 2022 23:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date; bh=E8I9rBfQ5kkDMM02r33jjyjvis+HSRyzLrad88lTqXk=; b=YL+dYDNj+S7MpBPdlQLQpKnh1GekYhLusBiVSqhfu5/pKOLZi9CVWRPKwDBeJSyX7j kXXwRsYWJaZXGqzYQMOlix/p/ydrFKtV/DlaF1uXDNnWjm7Hs2FOjp46Qtc90TBq9vgx cU1QSByZBj+u7ypE4y9vgALDUmEKWPTJrHxaIx0UxYKkR4DjwV+VW4Tp5i1/zLIDoN6k rXY+vrF4bw9FfjwSIRjOst+tcha/1m7llkkmqwC1cFs6rCEXd5JmOHtx4FiVtKWuiHjX mWL4h+wY9Xj507+6DgsaRTrk32H+g1QZUv9QqBz9JfxkxwDJpOhjgRIkYyYKkiQT+drd GuJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=E8I9rBfQ5kkDMM02r33jjyjvis+HSRyzLrad88lTqXk=; b=YwNIoVm6GJpxP+KziyVefVBMh7PpiQR5pMQ0hIy92a2HEvPbuvtuuQrCZdASnCa8bw Ee2VwsqSnZDpFwG1CsPi0+BpOshaGmJoRrIdgMK+i31LTbDgp2mlprHyrDj5qYeA2hkE aDFKvmC7svzzUHxbCfN0z6ldpAzxS+SvUYcHe/885pbql5oH1Dce28UzSZ5p8iLAEEB8 3HMJJGmfUZ96f3HIOnOkkDlNWgl1Yelg84ZOfwG4Lqok4vWCjs1hXUtz9T6LJ7z9XOrw GR40gf5W1UxtCt8R/RfhspcB1ys3njfK3aMb0FuxWgW0n5LgJJYCLbfwo9uTEIcdCIeM 6lsw== X-Gm-Message-State: ACrzQf2xOwk1VP4BTNhVEyAGvy+LClZrCpcg0tPuvvbTlEm8TaQF8i7y EP7OpdpEy2WXQ1HcFqedXjc= X-Google-Smtp-Source: AMsMyM5vNeur7GXJTuMTn4PsiPjjeN5I0wfzn23jiONcct+nwbDwCbwuJ13oqgPc0a+yCKBiselFoQ== X-Received: by 2002:a05:620a:1b8b:b0:6cf:4dbc:e0a9 with SMTP id dv11-20020a05620a1b8b00b006cf4dbce0a9mr672098qkb.342.1663742543051; Tue, 20 Sep 2022 23:42:23 -0700 (PDT) Received: from smtpclient.apple (pool-162-84-172-44.nycmny.fios.verizon.net. [162.84.172.44]) by smtp.gmail.com with ESMTPSA id h5-20020ac87145000000b0034454d0c8f3sm1057520qtp.93.2022.09.20.23.42.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2022 23:42:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH v9 12/27] rust: add `kernel` crate From: comex In-Reply-To: <20220920233947.0000345c@garyguo.net> Date: Wed, 21 Sep 2022 02:42:18 -0400 Cc: "Eric W. Biederman" , Linus Torvalds , Alex Gaynor , Wedson Almeida Filho , Matthew Wilcox , Kees Cook , Miguel Ojeda , Konstantin Shelekhin , ojeda@kernel.org, ark.email@gmail.com, bjorn3_gh@protonmail.com, bobo1239@web.de, bonifaido@gmail.com, Boqun Feng , davidgow@google.com, dev@niklasmohrin.de, dsosnowski@dsosnowski.pl, foxhlchen@gmail.com, geofft@ldpreload.com, gregkh@linuxfoundation.org, jarkko@kernel.org, john.m.baublitz@gmail.com, leseulartichaut@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, me@kloenk.de, milan@mdaverde.com, mjmouse9999@gmail.com, patches@lists.linux.dev, rust-for-linux@vger.kernel.org, thesven73@gmail.com, viktor@v-gar.de, Andreas Hindborg Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220805154231.31257-13-ojeda@kernel.org> <87a66uxcpc.fsf@email.froward.int.ebiederm.org> <20220920233947.0000345c@garyguo.net> To: Gary Guo X-Mailer: Apple Mail (2.3696.120.41.1.1) > On Sep 20, 2022, at 6:39 PM, Gary Guo wrote: >=20 > 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 = =E2=80=99negative 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.=