From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (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 A7702364D8 for ; Sat, 9 Mar 2024 13:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709989453; cv=none; b=F8pAk5brADTfVQl3A/nzMbgZqQegJ6H1lFItFkAXSmCoqmJVaKOkdjoFVS+owXy+oeFsSYnLFos7iFqB9SraQBTxiBlWy+I/wIUkvwUt6H/IJ0+Q91SA8sLeYQp3fH1rzEj4C8AN72gu2CfvhbUe6mOx7ohBzs8+aNaMjfJbaXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709989453; c=relaxed/simple; bh=EUv3cSpiLpsQFBKG1Yjm3U0IIFrHPhV6nt4DTmzqRPI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZwsLW9HMNMRJH/FQbbXovtst5Xcl1Pma68q14eNjasnA3kyjJWv0znLTInKd2Qa1aPbNDHf46HPwVooTHtOzvbrV3btSCK3hAX+nQpQTj7gG9fds8j27mBTybOayau6MTbLvtoHbZjx5pwafkIDgPIpGW7T6AglLzEmqJ5TY3jM= 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.16 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="HG3nX1K+" 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: rust-for-linux@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