Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4925679rwb; Wed, 21 Sep 2022 00:06:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Cz6tOFhhAHsUeNb0qNFf6144A8FiLXuNZZp4hIzA4BKnDDacaAt9XF8tzsAoNVMFUvkYB X-Received: by 2002:a17:90a:9f07:b0:203:5a3:1d25 with SMTP id n7-20020a17090a9f0700b0020305a31d25mr8275289pjp.74.1663744018587; Wed, 21 Sep 2022 00:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663744018; cv=none; d=google.com; s=arc-20160816; b=xJRJB4jAs80sLB+/SwXEN7N90dtt/FUpju+v+p87TSe2HXz+phznNVRuO3QYE2l15S 4AcqvfKQYAKciVhaYC0XZMv2Zdma1ENOehD7lAbXxUfXWUF5huPuzqoTSTcGxUOsuLI+ sJzngvFxHwns+LwJNUM3tdkBKhqe3WS271ZeomMoZoYpdaJGmqS/RDs89x0ek7LKbpUn Xz5+akDn8kjXm7tBrSsPKjcyHwtp5ak9rp4hzwcKc7R040Abj2UHnOSlZ4O2weWtIN2E 9sxLf12J7hMN1Mh6poibLilhvx0vCb4lMlYQbjPRjMCObL/efXs1EFaLn2noJSBj9y42 6Gwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=E8I9rBfQ5kkDMM02r33jjyjvis+HSRyzLrad88lTqXk=; b=Fzzc5zgdj7vKyV6rDLmjSJUsw3r6dVAJ0jxE4tC3IyGJQQ2iV1SoZfZcm8od6ZJZpg Nrp32g2uFv5WD3EieN1PECHnsdM+2qJ4lRjNnOb8BKCHKNMxxGauPgClotmWD+f7rxlw sg/VcsJ83IOpEU4fzSUuR/xQaCmrtR6HEdH+JSSzwpmT17PRkyJcOU/fT0EhsM9XcjFO nfzqbGWz1Qxl8bgprxjSsoNIvqQfbCJnetuoBHcv3/9LYVVg367Zor0f0quRLBhVL1Uw m8bq+3GnncSaJfyQZuvXrSbzEkv1WexYs/PCWwMvKMmHQETBMuCLGLRgVcQQz42ODWVT w+0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YL+dYDNj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d23-20020a63fd17000000b004391ca422c8si2429945pgh.92.2022.09.21.00.06.45; Wed, 21 Sep 2022 00:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YL+dYDNj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229966AbiIUGm0 (ORCPT + 99 others); Wed, 21 Sep 2022 02:42:26 -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-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) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.=