Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp5526lqp; Thu, 4 Apr 2024 05:48:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvIo+qH29qxXehUflSNhGhnp8BmYij1tkQbKyl3Cw4PjdU1qIUCIubywYzP4OTeQoNzbKXXOFl0v6Rn4pkLaikhHtLEOOvlDf1kFj9Jg== X-Google-Smtp-Source: AGHT+IEkbeIlS5BQe5A4iHW1Vhvnf/B7PMQQwd0Lg/iOpxPJhg4+cNUE2hpo2n44pbIzvJeF0DVQ X-Received: by 2002:a67:fa49:0:b0:479:c393:de06 with SMTP id j9-20020a67fa49000000b00479c393de06mr2179626vsq.27.1712234904612; Thu, 04 Apr 2024 05:48:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712234904; cv=pass; d=google.com; s=arc-20160816; b=B5ao0R0T9msQAMBie0mF2+hKVaUfV7yzXY5nARV3aNSRyzf80RX/kvYp/KK/5y7l8a rfU2IpNOsNGqCHXeUI/zNEUPAAOLZ3JC/ZZBNr7vXFRw5l56jPnPj2+RxUQUnge9dAM4 aKQl8cQdMvELlqbQQ3RX90FFSfzktSxttzmN0IxX2dCNDNtF5cADqvc37WJ5AhhawwDD xCRvRQcMCg5z+9/LpauhaisKtgtCF1F0qAiiMBjeSwpgboDh2SNoMqsXnb+p+RtMM+83 /jpef2itPMcXeRxdH0iBPEQzGAKzHmT+7wCmlFyAX6Pm7zSKrCFF9ncYJBOC6zhf09J9 dA2A== 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=OcWhq8YQr7wa7ZTE1m3VXpt+0logmlU/tma7Sc0giUk=; fh=DyVogQ8c5Cj1n9O1/+Dyp+/R+YWGTZMQiFOYqWfqhWM=; b=Dc416YZkv9INqYyHk1030Lb3O6f6qPd3JVy2vIZjCcO/r8TVMkoE3f5x13Ipk5mDoO tGdFpAEJh4VW1TLvWA1UjHU3ENxnVYdO+Z60IJOiodIvxJjOnZkDq9TCjgcmB53QvBM2 W2FYzRLnToUmtCXetUty0LRPOcNmxvCjkBkrIEKiwBjTq7FEPWxNypMgCH+GdzVIYMaT uSXrUMlbF60YbOMNCYmVGTujtcxsrzzp/A8nUyogppETqm2r9XYvtB+KJMDR4CnSj5IG fkfPkIo5aa5OtoRlVFhF3+UwatwQPr0dRHsRxJolwhfi6pamilbZv6bmmjfosHRN/liE Xdyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mETcBg1f; 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-131463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131463-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c13-20020a05622a058d00b00430d2319754si16867251qtb.580.2024.04.04.05.48.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 05:48:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mETcBg1f; 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-131463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131463-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 40DA31C20CBF for ; Thu, 4 Apr 2024 12:48:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F022876041; Thu, 4 Apr 2024 12:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mETcBg1f" Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (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 981918626C for ; Thu, 4 Apr 2024 12:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712234858; cv=none; b=fWlU6mUbdXaZLS6eUNLJKtL03BwimRSma6bdNAmaFa3FMvOCFh84+MVhCzWQOGKUZd9ROeJ2kvRLLuRNNJT4UiHsweA4sa7cK5S5mCMAkTi0/IqkNrMJbIXuxG+PlBnVhv3HxJ09eyTvo9uij6W2V+ExeyOywqT2+QL97oRZitg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712234858; c=relaxed/simple; bh=OcWhq8YQr7wa7ZTE1m3VXpt+0logmlU/tma7Sc0giUk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SByapBTmfy+LbtBJ1+FHcRJv8i8yoGPamM834dGVUHQVCsE8uRZPCCKSyc6WAyaXSK5Y9QmDnN8JZkFon50nDjaJPPu3F+v4ZKFEli0cg7i2ZpkGqXzwyMLKcZa5S5Dx/v9X7wzQy8/RXqlga4XZgwMYb4vNloqlYN1Bgl/cMVM= 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=mETcBg1f; arc=none smtp.client-ip=209.85.221.169 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-vk1-f169.google.com with SMTP id 71dfb90a1353d-4d8a748881aso407980e0c.1 for ; Thu, 04 Apr 2024 05:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712234855; x=1712839655; 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=OcWhq8YQr7wa7ZTE1m3VXpt+0logmlU/tma7Sc0giUk=; b=mETcBg1fzNJm+h9gZbSG+2mAFfC0Q+P/dcInHhUcy4KTlHwexzN7C1vv4f71BITRM4 J1JIWmHePsxTEGeeyLWJleHLd/5ZdUkNJcIGtel1/O1Dz4EGk4Ej3XWkI/Dg0qZBFYN0 420OqxLad046bkyb82LpDFkhbt+mDTfURwQRocDMzblZoAMRcZtVxUrd6hOoDuStENgZ iCCKaDGyXrI4gHpZxCGeaVQ6hYmvBIGnKWqxAPl1v6tQbjG+72SOW140l803CzT8LAcz XB1rx7CdmulgLHZQJVPlpOyIy7oRl5eV7icQlr6wIn1iZY/XVsxJUC2hDK6+RnrsxtyR kT3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712234855; x=1712839655; 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=OcWhq8YQr7wa7ZTE1m3VXpt+0logmlU/tma7Sc0giUk=; b=MOd6raGOSsYP61Hj4fUJ2CGxs0Ew9kqZnkSD0i5LPctHxvqkeLsN75G0frZK12Tmq5 zXBQcZFmpHOjiJPf76hly/wsUhZjUZ+bEU0E69HFAYz2ple1lVmHxYtzEds6yPeILdY1 FTiL5dVfLTXkMgCxCKlvT3Xq2FFN6rhoMe9whLN/zDG6hB7tRb31E1iH3C+5MI/8KGG/ qeKrbYRifcdxZxduXPkxq3d2dgNq0fbF0wOaUgsYiwWQCsdIMbYV79tFzQg7pBh/576W J0gNzdswUM/hUEZev1yYSifsShcSQG9yicUB3pS7uTfn4c/b2wWzLIwsmwNAU6sn1Bey hJMw== X-Forwarded-Encrypted: i=1; AJvYcCWAs9JNB5OTPwLrKVRMiWO+PzEmI/5zsBFbolIbq52CynD6MV6B8ABOqSdzAlP7UkL8etZkXtHHgLpqdJ9bybXyGJjdZ5M9EUYGzWta X-Gm-Message-State: AOJu0YxPx4wsmNmMcExNA7eRXu9ipQlPb3vIfuou1M30h+/3F5LbBdQs tcvK5RdyIeB8EbTwEmE102g2B+O2ZANTqNv2D1i+66SfJk8jAcQ5iLHza/UUU2TxVgPUgg9zi2g wL6vjEZ67KNPcYfaGzieUfOt6kjiDmxiclZH5 X-Received: by 2002:a05:6122:4b07:b0:4d3:45a2:ae53 with SMTP id fc7-20020a0561224b0700b004d345a2ae53mr2160905vkb.16.1712234855386; Thu, 04 Apr 2024 05:47:35 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240328195457.225001-1-wedsonaf@gmail.com> <20240328195457.225001-3-wedsonaf@gmail.com> In-Reply-To: <20240328195457.225001-3-wedsonaf@gmail.com> From: Alice Ryhl Date: Thu, 4 Apr 2024 14:47:24 +0200 Message-ID: Subject: Re: [PATCH v2 2/5] rust: kernel: require `Send` for `Module` implementations To: Wedson Almeida Filho Cc: rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , linux-kernel@vger.kernel.org, Wedson Almeida Filho Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 28, 2024 at 8:55=E2=80=AFPM Wedson Almeida Filho wrote: > > From: Wedson Almeida Filho > > The thread that calls the module initialisation code when a module is > loaded is not guaranteed [in fact, it is unlikely] to be the same one > that calls the module cleanup code on module unload, therefore, `Module` > implementations must be `Send` to account for them moving from one > thread to another implicitly. > > Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl