Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1248213rwl; Wed, 5 Apr 2023 14:08:15 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+ER3P2r3Wq1JrlDES52NFWwvHLaUTETXtq25dS7kp/r3KL80Q7kkm2PJ/vBdABrk9MKZs X-Received: by 2002:a17:902:db07:b0:19c:c9da:a62e with SMTP id m7-20020a170902db0700b0019cc9daa62emr8948583plx.54.1680728894754; Wed, 05 Apr 2023 14:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680728894; cv=none; d=google.com; s=arc-20160816; b=hAvI9MpujPfE6s54NM5kTpcj/eH6RXUb/h2YeBo2pY7FyY/YQfDKCmAZTIIUCvpT2q heRBXVtkab9W65srAw+5PXVZ08l3m2J4r4PX6dFK+ffsrr3QuMDDTl5rLrMIYDxOI7a+ ruPCCHXjn4TSaS8gXRp7kyfeyUKZ/PyS3EIrZInvyxdfa6jFbpku64jd1DzYnzAiK1s/ cyqF6LLJUJje+bp/6n1Fhd8sduz33WP71Bs4C2p1LVjQMmd28+4YL+qd/Nbe8uMkpXMp OUx5sHjWHOtuHzD18CmMWLT44AwgkrKYiJOj+XNVv7NdrsN2VfRRezn5kXL2kh+EPMpw F/FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=iC6S0Dd2wld+hFfeTW38jpjfvqTCQBMPpfTFPRnn/3Y=; b=0DEy1vGBtPY1zHOU06YuNVKAKYUgpqSQQz1cBkzAYt7oKH3nmcOyisDeTysBFNSi6g LRssd7zoQowVy5V/LeR5fo4WS8SpnEXLVaM5xQCciKYe6TKq65uxScErg9WlJVfrnFH4 htoz+3ooqSLyER/9wbxli29Xp18Ihh3fJZj0iCyXDqr1F/Te1GHkjy9AphlEFwlXrm9L Y1/n2XQ2R7zTq8+86ADeeroqMDCrFaU/XuXMfTbwj/L45DnjB4KpkF36iJLQqH0x0O/s h888OBiqK6Lt8dWT/x1wIHQwedqti17TIWk2t6iIdBYf39tlztzgbCK9t4HBo2JK4++r iipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eVWI8JOB; 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 i6-20020a17090332c600b001992ede12a5si13857827plr.27.2023.04.05.14.08.02; Wed, 05 Apr 2023 14:08:14 -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=eVWI8JOB; 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 S232406AbjDEVD3 (ORCPT + 99 others); Wed, 5 Apr 2023 17:03:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjDEVD1 (ORCPT ); Wed, 5 Apr 2023 17:03:27 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA03840D3; Wed, 5 Apr 2023 14:03:26 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id t19so36277837qta.12; Wed, 05 Apr 2023 14:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680728606; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=iC6S0Dd2wld+hFfeTW38jpjfvqTCQBMPpfTFPRnn/3Y=; b=eVWI8JOB0Had3eImwcXP0NoKKQ6I2s3MyEt3DNSFiUrTVYCm104vOLyhAjR/VAT7ad PPEF/QAko3n3Q/io0d/zmQJO9DWimzOr4tkqXrygIY4InIIaKRjflbIRTosoplEZpPi5 VpeDsFVvfttkDAb8JN8PZnOj69ZTtXTSGxuQ+KQlxc69faA1Fz33khhfMIW6MrzwfXVk UdOn736Mh8vUSwjQgQghEr61biqcyq6Z0p1OPTO1XVOpl7dRqeIj59y8+fqQ9qa3fPXu a+4sc8QFjNWCHRjGJ1cPwTaD4+4rgOxx0GH1AmeovU1I8E9li58kn0ZUCzioSp8keiOz YJgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680728606; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iC6S0Dd2wld+hFfeTW38jpjfvqTCQBMPpfTFPRnn/3Y=; b=3HthH86z4RxapDDaN23wnKQLyoQKUT06xpgOdNzgLxbHD4tHei6FrPqHP3FvakIdZp CjHe9scxRrGaC9FBUao+kJfTjPrV2uvAI2o1FZUG4k4a/JZb2EnXmiZZqzlhT4fIL54L WtQi8p4j9YN1qeaIomstHbxcYSfs85v/FCn4jiazSjAkjRspmBZtO++2/DMeIk4I7dOS jtLpYfZkufjCwEmmxPbYxpYa/CKIaLX60DTipuHeDAOVpLOgelKBysvjxdeUj0+XZhNn XzaerM3O+oOuCtpThCPzwutYFpvi0z0euLIxOByyS3cmkxSwkyotS9WjQsG76oBymGZG OUZA== X-Gm-Message-State: AAQBX9c+PwC7aBH35PFop5+nL+udBL8nDVy7YOySnZB8c73k26PjEP4Q 45JXxWT9VgZQrf0tTTJYdX4= X-Received: by 2002:ac8:5a84:0:b0:3d3:fe29:1caf with SMTP id c4-20020ac85a84000000b003d3fe291cafmr6902530qtc.0.1680728605725; Wed, 05 Apr 2023 14:03:25 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id 15-20020a37080f000000b007485a383921sm4686543qki.116.2023.04.05.14.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 14:03:25 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id B2DCF27C0054; Wed, 5 Apr 2023 17:03:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 05 Apr 2023 17:03:24 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveei udffiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedt ieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfh higihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Apr 2023 17:03:23 -0400 (EDT) Date: Wed, 5 Apr 2023 14:02:22 -0700 From: Boqun Feng To: Benno Lossin Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Alice Ryhl , Andreas Hindborg , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v6 00/15] Rust pin-init API for pinned initialization of structs Message-ID: References: <20230405193445.745024-1-y86-dev@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230405193445.745024-1-y86-dev@protonmail.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Wed, Apr 05, 2023 at 07:35:30PM +0000, Benno Lossin wrote: > Changelog: > v5 -> v6: > - Change `pinned_drop` macro to allow `mut self` in the signature. > - Change statement fragment to tt fragemnt in `pinned_drop` to prevent > parsing errors. > - Move evaluation of the value in `stack_pin_init!`/`stack_try_pin_init!` > to the beginning. Could you elaborate why? To make sure the $val evaluation happens unconditionally? > - Move setting uninitialized flag in front of dropping the value in > `StackInit::init`. > - Remove `Unpin` requirement on `zeroed()`. > - Add note about `Pointee` to the `Zeroable` impl on raw pointers. > Regards, Boqun