From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06300C32771 for ; Wed, 21 Sep 2022 06:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbiIUGmZ (ORCPT ); Wed, 21 Sep 2022 02:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbiIUGmY (ORCPT ); Wed, 21 Sep 2022 02:42:24 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F27DF80F41; Tue, 20 Sep 2022 23:42:23 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id u28so3360208qku.2; Tue, 20 Sep 2022 23:42:23 -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=nmfV8YV4GD5TEuOWPndXURGEq84sMc8P7u+rLHg7yfIS7XuKZyeO4a4Yo9ffnL1JzI uXuzLm0VIw5FZ+PuKRYENKrbFiiz6IqD/cYatrkpNNAaipdWVeCAYZP4SatC7QTTsUZH ik4pOv8kaaxPBUs780UnJjdb0KnAh6oJ8UnWYDapWzFW9s68oMZbunaSUKKw1gDZsLfu t2woMqHlmfR/CvnwPF8xUomZnbB7lmp2N9Okpb+YwRfOn3z64RsgwNQtdMTwghtNML5/ +mENOAawMGPLFvO5NCkcc57Gxxuwin41P1GvNUMUFzVUSH6ozzAyR9imq91Li5LeRJkk bdxg== X-Gm-Message-State: ACrzQf24hczsShas7gnq1xHW20R/O+oL7GcdWheFyV2pvxy+pQgBun7J l0a4y5PGI618g60RCH4yb+I= 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 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) Precedence: bulk List-ID: X-Mailing-List: rust-for-linux@vger.kernel.org > 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.=