Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp161283lqk; Sat, 9 Mar 2024 05:04:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVyZjoaSBaEHjjqLTL09oqV7dVO/hy1K4uOpZV9gcaeWfVo1zqBUwBcdTXO78JnlcC3gHiC6s3ah1m7EdYSk2UFqQHML7Vw4Gx0Si1Wxg== X-Google-Smtp-Source: AGHT+IE9laSPqsGrPf6qLsKAijo6vSu/j7CMFhyvxduHskjCImjGRMALNQ3mLAxakEC5vCqnVNW5 X-Received: by 2002:a17:902:ea0e:b0:1dc:d642:aace with SMTP id s14-20020a170902ea0e00b001dcd642aacemr1583537plg.0.1709989466403; Sat, 09 Mar 2024 05:04:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709989466; cv=pass; d=google.com; s=arc-20160816; b=hbVHECbLFQ3K8BTyq6RkaYSkz0tj6K3o+2WYA7WZY1IA+5bQ58GD9hXnaqsRymO7zo BCfpIcaOlKvhbAoSCvA8jX7SrmfpOU5f6CFE383TOHp43sc0t8sts3MEB/GwIv31BuV7 ITGN9MLdQBghakmtZXf0KNhNfTJz/I1MMK6N350H8b45ZPbZLotFAPCDQPgHtsgI3awK E13mtJeOc8zSCM3XyFSnOuV8D+ZZpX+Gufl1bfPXzebrZ9Hh46GLjwVKcY9NFId1ZsT3 ns0KsgjkcFMtr2zmtPmb9Z6Unc4yXPbZqOAqPaM0JfpWc1jSYriX0M0j4jk9FskmeToj CRIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=EUv3cSpiLpsQFBKG1Yjm3U0IIFrHPhV6nt4DTmzqRPI=; fh=nBIU09dkdw1pFNvOl0hziI6raxaJ3qXyfxUzWt0uves=; b=IjFGx6RKfZAZq8F5U/z1ayY5z0m2raNCLyJsfZevOzN7d+zzZ0BfgBBwBCcq/Zx+Uz /msdCdu1lV3hK5QGWRdrGq8MsD83brALWoTQ+64PMXOEwOZcphBpTcYHHyZxo7UqsHxl bVQ8ZzAYIVeB0SSyl0KQsBGMLGHedzU/nRfCpaP0lLOYdiOeIg2wKKQGVvWKtHWv3bMg dAA9BHtdX50Wcf+F4UOSt0vgLSnr54K+r7Npcsg23gVlZCVcIFLbDgVaAch0FK24L7er KgefGatYpFUwl4MxoYnpT8YNR3GAXHVM1FYQNoqvl/9iToR+9kHc0otF7VKbWIruESfk Hfsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=HG3nX1K+; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-97894-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k18-20020a170902f29200b001dd363b81b2si1320182plc.173.2024.03.09.05.04.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 05:04:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97894-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=HG3nX1K+; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-97894-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6322BB20F01 for ; Sat, 9 Mar 2024 13:04:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFDA138DF2; Sat, 9 Mar 2024 13:04:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="HG3nX1K+" Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 679ED2C853 for ; Sat, 9 Mar 2024 13:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709989452; cv=none; b=ii+JcoqCFJYRpFHgMseAaNjoFSfWyhxJQhRAJmJ0ATb7Y5UIQQUxajFTwHimq/NrQuY9hC15v8BLgSJV9bjws8/LROjfUkQ+Comk4Ccun4efpNzukgrNtdCl36yQY3bR3mXCFRVqb1d5xUUCJi1YJm+n4gjS2+m/BIwvegmORzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709989452; c=relaxed/simple; bh=EUv3cSpiLpsQFBKG1Yjm3U0IIFrHPhV6nt4DTmzqRPI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aT+gm4tkmWVRZeSkduQAuNEvFhiGovo66qGPaaZ5qL2/ZE4Cj0Txflv/kplY3UVwHYE4UOkT/ATU91ZK5XIASafXC665qryVXVOD/H2P7R6uI4quPTXbM9/FoU3lxRVQndChdPkVp+jnTJ3KNW1sEI5p/iY41EHW42hHl1mWMHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=HG3nX1K+; arc=none smtp.client-ip=185.70.43.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1709989449; x=1710248649; bh=EUv3cSpiLpsQFBKG1Yjm3U0IIFrHPhV6nt4DTmzqRPI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=HG3nX1K+05JUq9ePBatCJW6WRfu+0Hj0C7yqd3UFtOoWZGYRQbL4HDeTPuvKHnSeU fa7YPt1mSSpSsMNYKexkU1+k30VfR+gz0dC0lITe7QJ52W1ygIqnYjnWsTDm6TbdvA obRoGuytIVIzJCFdp08RK9Bldqlbe1l2B8aPycIG+M/eHb4EE8rQBWtrav8ATL7AM4 WXz7KIF3Gk/8keigIxHHm3pwtmbuncPDA6weX8p2aKnErH3M8Kfl7gW/sRZLJNPKJS zL+JfXkj8stjdVqXE7DWhh6R/eJHsnf2l6bcI9me3xSrr4wr5a22HRRaC2+wmRqQeb V3ix5xqrrGnRw== Date: Sat, 09 Mar 2024 13:03:59 +0000 To: Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rust: add `Module::as_ptr` Message-ID: In-Reply-To: <20240226-module-as-ptr-v1-1-83bc89213113@google.com> References: <20240226-module-as-ptr-v1-1-83bc89213113@google.com> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/26/24 10:44, Alice Ryhl wrote: > This allows you to get a raw pointer to THIS_MODULE for use in unsafe > code. The Rust Binder RFC uses it when defining fops for the binderfs > component [1]. >=20 > This doesn't really need to go in now - it could go in together with > Rust Binder like how it is sent in the Rust Binder RFC. However, the > upcoming 1.77.0 release of the Rust compiler introduces a new warning, > and applying this patch now will silence that warning. That allows us to > avoid adding the #[allow(dead_code)] annotation seen in [2]. >=20 > Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-2-08= ba9197f637@google.com/ [1] > Link: https://lore.kernel.org/all/20240217002717.57507-1-ojeda@kernel.org= / [2] > Signed-off-by: Alice Ryhl Reviewed-by: Benno Lossin --=20 Cheers, Benno