Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp261010lqk; Thu, 14 Mar 2024 02:15:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQayo2YU1Whn2KbQnwV9Sp3oRYKYPrcCYlCIEWAz+UfPkZ7dkkPTmVzZWAiJle5Z652UaTHglr4pXGXYpt+oUYtB8JsWAAhdFjUXX1AA== X-Google-Smtp-Source: AGHT+IGPSLsBL5tRCLlmsbs3NDWY9dPA+fscf1TrLtcO4qKgC9VVQohDKk34ZAzsJzjc0wT8koZN X-Received: by 2002:a05:620a:40c1:b0:788:7a4b:6535 with SMTP id g1-20020a05620a40c100b007887a4b6535mr1397215qko.31.1710407750104; Thu, 14 Mar 2024 02:15:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710407750; cv=pass; d=google.com; s=arc-20160816; b=lXCklXMcs07dMMNjymofR6cGjZCKweFoW64KPWDJ9EGBzqd3xBRqKiY7VakTxODb1O ms8U2rE4Fa/IRcUHGsIM+81TCX6kpMOp5MA/0YugljBLcFWJfw17aw9ZF653ifIDYoMz 67cI8wOuzOMAUk6NwggzieMzZ8PhmS9A890+T7PtelbDBPSk7mGEi+xzfXdiF3jWKixo qoSymyXBFQN8a+rNLtJ+QbA3sk2u1xsiZGSm5XXbGzzFpw26x1T0raz6ay5Ki5Zl391q g3CiFgQ7WmUJbu50PXgchrloB4KUEa1zwaJ7P5YplIYbYwSeiuvb+qQJ/y6Ina2ySoXP /fDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=lE/ZP5Tkvx9YY0FpPfk+sLpzNiYxoj91aWi14jou22k=; fh=Z5mvIxDbnwwvfsLGDkOrsT6ORlrXSix7h2z6C/K7AeE=; b=fWTu2Tf+hxwwlNp8KCvCf9BD9K2pLCFwHIPik9KLoxKmESnojF/9WAr9BoWCmjtAlr swI8kLepYzvIkat51OygJd6FcwANw3IPCidiD97hnDs/f9FFpyLu0atMhARjKQOggFup MeQ3EeTg3ePaPtIDSgPN2wlf4lXy5WghA6vLcjJPtOjy9V7NoTrZBiW3bEhQi5YMB18z imV6dWfiJxYVtMsh4Y4pTEo2Ezs6s+f77ZB6B3udZx7vZdeiAzWWSXMi9Ncqtte+fWvJ /paqn7zVX34LyasSEQ93v+G+H23qvdNChO9YK19Yyaizzu3MXzxYiOMB/DSPHIjvazXw Mwkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ubFCNPhe; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-103033-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103033-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c20-20020a05620a201400b0078853fadae0si1121997qka.144.2024.03.14.02.15.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 02:15:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103033-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ubFCNPhe; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-103033-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103033-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CF0BE1C21F96 for ; Thu, 14 Mar 2024 09:15:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB3D66CDDE; Thu, 14 Mar 2024 09:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ubFCNPhe" Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 9A5686BFB3 for ; Thu, 14 Mar 2024 09:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710407712; cv=none; b=qzv1rWNKTyJdUv7t7S803LgfOV1MlZOd1Lwu8P3HbT/hvOZ2LFNzX0rohRjyCm2BJ4q+WYqBT7F9vW4YkyyvsunZm+HNdZ27DD3+c9km/fz0gjH+1EAY4paNy5tYkog6xHas0bo2Tr5b3XT383JZTjEz+dGaZusW7RBtXY1z+mY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710407712; c=relaxed/simple; bh=lE/ZP5Tkvx9YY0FpPfk+sLpzNiYxoj91aWi14jou22k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VLxKI3c8aWlZdPb2NP84RRMiZWgfkRvhtN89++k3d0ihQpYBZB82lP6oAO5rAysLRzUeSLWfwd06mCnEa6o9nsDlQunPXnXwfZOfYMLTNG+GI5iINElqqjaXDfOUXjCH3yfewV5xMIM2tixWquP+TTG7SnH5cWrZPvcYAprKUsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ubFCNPhe; arc=none smtp.client-ip=209.85.219.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-690c5d7851dso3811276d6.0 for ; Thu, 14 Mar 2024 02:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710407708; x=1711012508; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lE/ZP5Tkvx9YY0FpPfk+sLpzNiYxoj91aWi14jou22k=; b=ubFCNPheSIZ9cs6MaZxKWElEVqfL+s3kamjXeBCi5TL+nFgDVocsEf/N34w/gQXVeR 0LqK5N5L9cob0jrM+f06EPxadjMNgbXM10e4we3+v20YN4+oZzGSq809ILziIuLklVf3 MBm43VXX5DXR9vpuXWhLQJkZrcstImmNuzovBiJ6kUS7KGdNafB6ePLmas1Yg90DDG03 whRbVMEzHbrjEoARIstnlcsrPPjeL90l7fJUSi7+N1nlhc63QTNiYR/XCWHbWFoB4enw T02PnMckcF/xjSPGoeMaeSN/Mx2E151p/NulWThbpZmFZgW6TqG22w6hjIaIO52cbznP R02Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710407708; x=1711012508; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lE/ZP5Tkvx9YY0FpPfk+sLpzNiYxoj91aWi14jou22k=; b=b+KeSSzHLByP72AtFCtMQWS0S7rYS+dTgwmp+FjiiAelPX1EZKk1f7P5Ws9H4CKUvq VfAQA5mEzJiuzYGy3fREZR0HvKZpE+YjTyNMOni3kUNyMdL99pmxrA0gzuZ/vNlhSg0i xJTVrMg1l56mLMhxRW9w8c93wjqfhzphQYywu1VcqrPWoJEgN7TDGzm9qO5Tt7T09Sin W3gPFgk+zXRgZW9n2iyT8rz2+QJyiCwzvH2rt4PoTalpHjvM8mPMDPiRsEXQLtBxZCUL YZ66Hyf28kYBtMbRHtbWUU4wuQML5gGlb//wJKXUTeIkgXsHtorsjBTUfcQS7Qez3sNm 74Sw== X-Forwarded-Encrypted: i=1; AJvYcCUCjRdTKzfl9Rd1zFPxVtGTNtbZQ39/WZqk1kKFgS9vij1TulvqvrmqGJ2At3oNUPCnzfucaUTt97jmc9V/oudEyk3WkD0RYUuZA9RD X-Gm-Message-State: AOJu0YwX24VLp8cWvNRkxPgeN7IwYQcauVkCBEf18GlUqGdDXLTmr4RX CwKoHUApJmm9t7Kr9WCblI8I1O6c52oUI40ah0I0KVpHFxBj7gx6ZRMK/tcOPpPOp77GM7PcfPk 3r4+6yMSmyvNKmwpd6hPfSvYfBf6wyzrzWNFE X-Received: by 2002:ad4:53a6:0:b0:690:d719:d575 with SMTP id j6-20020ad453a6000000b00690d719d575mr1324895qvv.43.1710407708463; Thu, 14 Mar 2024 02:15:08 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240313230713.987124-1-benno.lossin@proton.me> In-Reply-To: <20240313230713.987124-1-benno.lossin@proton.me> From: Alice Ryhl Date: Thu, 14 Mar 2024 10:14:57 +0100 Message-ID: Subject: Re: [PATCH] rust: init: remove impl Zeroable for Infallible To: Benno Lossin , Laine Taffin Altman Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Martin Rodriguez Reboredo , stable@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 14, 2024 at 12:09=E2=80=AFAM Benno Lossin wrote: > > From: Laine Taffin Altman > > It is not enough for a type to be a ZST to guarantee that zeroed memory > is a valid value for it; it must also be inhabited. Creating a value of > an uninhabited type, ZST or no, is immediate UB. > Thus remove the implementation of `Zeroable` for `Infallible`, since > that type is not inhabited. > > Cc: stable@vger.kernel.org > Fixes: 38cde0bd7b67 ("rust: init: add `Zeroable` trait and `init::zeroed`= function") > Closes: https://github.com/Rust-for-Linux/pinned-init/pull/13 > Signed-off-by: Laine Taffin Altman > Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl