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 545E02737EE; Tue, 1 Jul 2025 16:54:23 +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=1751388864; cv=none; b=BX+x4ffySt4bbArb3/lcOA2snvrusM1RGG6HbFrK3BuIXV9sptBmX5VS2iyiFVQfW1kWyfCeqbtav+NwCRuwmwEH0A4RF4viayc9WLPcVizHWJGxDxc24sRPJnvt6TD/Vyt3QWNP1HLkDHs0OfKxU1dp8qVvfFtYOXOpgl+wn8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751388864; c=relaxed/simple; bh=1+3vg/zcoknj5CNtt2fI/fvugWzLylZAThTmozfd2T0=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=Bfaa8peOH7ELrh+VUwjLRaD+OdvwXj6vWCH/toI1d+9c7X85tY+8I8Py2HcUX8VVmpmYScQhMsiFv6UMHzUCl0ku7jfDCbPd7BomquZtSHRE/ezamwkPGm6uqzWzlW1sSQUCjWQ3ceuYHzugUKCsul4eGg8JbnNaa8aObEWYuAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cjTP4Cjg; 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="cjTP4Cjg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28305C4CEEB; Tue, 1 Jul 2025 16:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751388863; bh=1+3vg/zcoknj5CNtt2fI/fvugWzLylZAThTmozfd2T0=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=cjTP4CjglFq69TzZto2YkmcX6/C7ZNv28mnh9AgDEuhJOIUT927ObGGXqas1KFbtM f1C+fiZ3YupfXos9/wRxQJzsicUjKU7e6Ioh7MnV53rCAmRIaEYFEzSPHttRnjL4ZB XKSsF9I02+8CvW5KukJooRRAZVtBvwzhuxW0C9oJfCTV5DhT7eUGKMsTXRBScDzB7W etq9XgPFSr45JT32yhfr+03b8uG8bNsrveui1Cp6xt70R8w24RfW2wmPk5qBqINA+x euU+wag8GoK/GZumIDc7W+9pG4QEorfu4prSu72NlqD7tiWKwVruPAZKbz7EG/K3Vv xf07OWDySblvQ== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 01 Jul 2025 18:54:16 +0200 Message-Id: Cc: "Andreas Hindborg" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=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 From: "Benno Lossin" To: "Miguel Ojeda" X-Mailer: aerc 0.20.1 References: <20250612-module-params-v3-v13-0-bc219cd1a3f8@kernel.org> <877c126bce.fsf@kernel.org> <87v7om4jhq.fsf@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> In-Reply-To: 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 w= rote: >> >> 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. > 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). --- Cheers, Benno