From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C3A459480C for ; Thu, 10 Sep 2026 19:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789066820; cv=none; b=fsVPPkt3L8g0o7++Hug8wbwGFVRhGOxp2WmTuh8nLCF4rDmOzGklkefBEEik9B+gMAubLQ8cTG1nM2jzgcxafWztHXp/XZ1DjLAMGo6uLOkrlsu8ZNg94b5EO5BBcShjQsDn4QUbU8ij//QZGG51avj4ObzhkvogGVTOJG3AVIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789066820; c=relaxed/simple; bh=0vvZwREGhVLOGIz6V7/e3vYEdb98WjrdXPg4bmpdzmM=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=eqDYUocOz0uT+sif201qCeuqEs/qGwAtR4BmgGA07K7EOmd/wCB3CxWrvfRQSp11fbY4ypz4ULUgIT3hfxp+GBZz1cW8fqCQobm1mMU5B86OQPAMdJLPRKQPCmBUlChbgHt/hd/cRqktVUNbYxk/F8TBpUkQXRBRTKa08Byxfg8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=KfUXvnD1; arc=none smtp.client-ip=209.85.160.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="KfUXvnD1" Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-5300bdf61d9so1355961cf.3 for ; Thu, 10 Sep 2026 12:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1789066817; x=1789671617; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-type:mime-version:message-id:date:from:to:cc:subject:date :message-id:reply-to:content-type; bh=uy7q6C+WBEDRAlNlGjV9EVm7qH12BqCcTHIyf0ThSEU=; b=KfUXvnD16lizCzF9wvGLcS2je7B/yEqIi9sboIHbA1cMJ+emGPxk+sSiCucig8SpXK hYv3/m8+oYneYZlQicJmBZfZBqM6aID/qplSJtPJL/Q5U3GHW6Jat3VX4ypsnLkafnxg jkelDKYNQTbL2awAL4/xmSnPGgySwJ9KjipDv/S581d4aW0sNobZQVJuOSw6jvrFwAL8 5o7orzIu8kaSOUEw3aBSuMIfjcrorTOYzxAO8BmXf1XitD4t4xG8M/O8K6PF+fK4AMWj Xsu1ZTknwnfunmzbay0cAuhsVOV4vuGJHIH7F7IH+8otWPTFga7D9poq/fsUmz+gcKrl USLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789066817; x=1789671617; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-type:mime-version:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uy7q6C+WBEDRAlNlGjV9EVm7qH12BqCcTHIyf0ThSEU=; b=lucM+pHhFvmAsaOdKWvmvy0U+PrF6EeDHxK+iiWY1y7O79tpm/dkRd+6YDncjHofa/ 2qn6RN4g6MrGKsAX3Pprh/uWVB0GlXf+MejhrmOVCqheGpB9WupMvkt7x12v7vhlqphB LYMyaQ5/TS4FdLdI6xYzbFShzcZ6qrC5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530:b2e4:91bc with SMTP id d75a77b69052e-530c878ffdamr12092271cf.53.1789066816931; Thu, 10 Sep 2026 12:00:16 -0700 (PDT) Received: from localhost (pool-71-126-255-178.bstnma.fios.verizon.net. [71.126.255.178]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-530ca50cd05sm270221cf.29.2026.09.10.12.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2026 12:00:16 -0700 (PDT) Date: Thu, 10 Sep 2026 15:00:15 -0400 Message-ID: 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: 8bit X-Mailer: pstg-pwork:20260909_1743/pstg-lib:20260909_1550/pstg-pwork:20260909_1743 From: Paul Moore To: Nils Lehnen , James Morris , "Serge E . Hallyn" , Miguel Ojeda Cc: Benno Lossin , Alice Ryhl , Gary Guo , Boqun Feng , Bjorn Roy Baron , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur Ozkan , Atharv Dubey , Ke Sun , linux-security-module@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Nils Lehnen Subject: Re: [PATCH] rust: security: replace `core::mem::zeroed` with `pin_init::zeroed` References: <20260828024335.946-1-nils.lehnen@proton.me> In-Reply-To: <20260828024335.946-1-nils.lehnen@proton.me> On Aug 27, 2026 Nils Lehnen wrote: > > All types in `bindings` implement `Zeroable` if they can, so use > `pin_init::zeroed` instead of relying on `unsafe` code. > > If this ends up not compiling in the future, something in bindgen or on > the C side changed and is most likely incorrect. > > Link: https://lore.kernel.org/r/20250814093046.2071971-8-lossin@kernel.org > Link: https://github.com/Rust-for-Linux/linux/issues/1189 > Signed-off-by: Benno Lossin > Reviewed-by: Alexandre Courbot > Signed-off-by: Nils Lehnen > Link: https://patch.msgid.link/... > Reviewed-by: Alice Ryhl > Reviewed-by: Miguel Ojeda > Reviewed-by: Gary Guo > --- > Resend of Benno's patch from the Zeroable series [1]: only patches 1, 2 > and 11 of that series were applied, and the issue [2] asks for the rest > to be re-sent. Rebased onto rust-next; it applied cleanly, and a > defconfig build with CONFIG_RUST=y and CONFIG_SECURITY=y passes. > > Two equivalent one-off patches were posted earlier [3][4]; Miguel asked > in [5] for a resend that keeps Benno's authorship, which this is. > Cc'ing the LSM list per Paul's request on the original thread. > > [1] https://lore.kernel.org/r/20250814093046.2071971-1-lossin@kernel.org > [2] https://github.com/Rust-for-Linux/linux/issues/1189 > [3] https://lore.kernel.org/r/20251129135657.36144-1-atharvd440@gmail.com > [4] https://lore.kernel.org/r/20260120083824.477339-8-sunke@kylinos.cn > [5] https://lore.kernel.org/r/CANiq72nJqFOR9vhPBfZUNrxU+M1HMV6wN9bN6i8e9rf_oOD2qw@mail.gmail.com > > rust/kernel/security.rs | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Merged into lsm/dev, thanks everyone! -- paul-moore.com