From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F240023817D; Wed, 2 Jul 2025 08:30:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751445013; cv=none; b=S6pdp66oe6TEW2d580zDlK3HDhrCCoT0gbd5yCICPh/IzHX4kcsoOcM0n2BCC4vkFhyZAzRJ8mH2lI7NOOA+72qTQXdwPgkG/HoSfzO5xkNzODBwJ0AdEtcc35lfkr30prlZttdhvy8m0hkucRvNxwaUDzXb/A1XBKV8vm8KZ2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751445013; c=relaxed/simple; bh=gn8Zc85bDvq6Yw8JF2nDhKZdd2hRMJcauN+/NgAcs8k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=gCLzkbarGwMjBeNBLrrlQuRGOi4Nvh1+S6EJl0ZFAgtKg5h6GFfuBrV21neMohoBFcbv9U10n0O+7xmDacT5TTVIjarSvSnvyljGJkqSG2NQv2cPMJGkpzgBNAbLsB057DKhvEjJiJxy2tRPslLI/YE5B4tazDx0+3A84lVKPw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a9ym5aiF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a9ym5aiF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C50C2C4CEF1; Wed, 2 Jul 2025 08:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751445012; bh=gn8Zc85bDvq6Yw8JF2nDhKZdd2hRMJcauN+/NgAcs8k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=a9ym5aiFDlphY7bTPOEHI3m+wdRV61RZgi9V815irDzEy7y72+ZUMLd2+ve6+ufzf 7y8p4mu0euNoB1x52LivNm11DSwd9Sa65Hbum8084GbJHE3rN0SpjWrDpNwCDpsOs6 Pm3PHHHSrfRhjelqtzFW+n5yW/qbTFsAJDnpuJNkmolklTny1b9xFxIl9qynO5F0Hm BR7Etk53j/KVX5IQF2zeOAKjpxM0zm54MMDeVsnIRAhJVRAjWpeNwJTa60E1xWeeJi yU9WCiIWDD9a2Xgijciy64PEk92flAv2vg9GoAAfJNdWMuExGRHTln0fF8iVkNsJSp 4BUSs6vjXDkEw== From: Andreas Hindborg To: "Benno Lossin" Cc: "Miguel Ojeda" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj?= =?utf-8?Q?=C3=B6rn?= Roy Baron , "Alice Ryhl" , "Masahiro Yamada" , "Nathan Chancellor" , "Luis Chamberlain" , "Danilo Krummrich" , "Nicolas Schier" , "Trevor Gross" , "Adam Bratschi-Kaye" , , , , "Petr Pavlu" , "Sami Tolvanen" , "Daniel Gomez" , "Simona Vetter" , "Greg KH" , "Fiona Behrens" , "Daniel Almeida" , Subject: Re: [PATCH v13 2/6] rust: introduce module_param module In-Reply-To: (Benno Lossin's message of "Tue, 01 Jul 2025 18:54:16 +0200") References: <20250612-module-params-v3-v13-0-bc219cd1a3f8@kernel.org> <878qlh4aj1.fsf@kernel.org> <87plepzke5.fsf@kernel.org> <87wm8txysl.fsf@kernel.org> <9G3W1seaM7elcwWXaeoaa2nfpFYCf-AmBdvZhACGP13KGUtTPVMwGNYdTQsdtp8ru7GIP3-UYTzXscC1MRUKrg==@protonmail.internalid> <87h5zxxtdw.fsf@kernel.org> <87bjq4xpv7.fsf@kernel.org> <87zfdovvz4.fsf@kernel.org> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Wed, 02 Jul 2025 10:30:03 +0200 Message-ID: <87frffvvuc.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-modules@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 "Benno Lossin" writes: > On Tue Jul 1, 2025 at 6:27 PM CEST, Miguel Ojeda wrote: >> On Tue, Jul 1, 2025 at 5:43=E2=80=AFPM Benno Lossin = wrote: >>> >>> Ultimately this is something for Miguel to decide. >> >> Only if you all cannot get to an agreement ;) > > :) > >> If Andreas wants to have it already added, then I would say just mark >> it `unsafe` as Benno recommends (possibly with an overbearing >> precondition), given it has proven subtle/forgettable enough and that, >> if I understand correctly, it would actually become unsafe if someone >> "just" added "reasonably-looking code" elsewhere. > > Yeah, if we added code that ran at the same time as the parameter > parsing (such as custom parameter parsing or a way to start a "thread" > before the parsing is completed) it would be a problem. Guys, we are not going to accidentally add this. I do not think this is a valid concern. > >> That way we have an incentive to make it safe later on and, more >> importantly, to think again about it when such a patch lands, >> justifying it properly. And it could plausibly protect out-of-tree >> users, too. >> >> This is all assuming that we will not have many users of this added >> right away (in a cycle or two), i.e. assuming it will be easy to >> change callers later on (if only to remove the `unsafe {}`). > > Yeah we would add internal synchronization and could keep the API the > same (except removing unsafe of course). That is true. But I am not going to add an unsafe block to a driver just to read module parameters. If we cannot reach agreement on merging this with the `copy` access method, I would rather wait on a locking version. Best regards, Andreas Hindborg