From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83B5CC54798 for ; Tue, 5 Mar 2024 07:18:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhP1d-0001on-6o; Tue, 05 Mar 2024 02:15:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhP1L-0001ib-W7 for grub-devel@gnu.org; Tue, 05 Mar 2024 02:15:28 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhP1I-0002Ak-8c for grub-devel@gnu.org; Tue, 05 Mar 2024 02:15:26 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a293f2280c7so918891866b.1 for ; Mon, 04 Mar 2024 23:15:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709622922; x=1710227722; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=2P9363r70wjkK97Zzcx9SeDd7MXg+Y/HMujYcgQqz9E=; b=T+SXCQAk78bVUfiBcbRhSmWDFmFptIQTsbMnzBP7P5XG42gtcvVjCkqXQppkFA/ZwQ gqQYMaigL+9Y022yhoPKlQL0i5XIvyxDkXYd5hsruAYvNe8r/Neafq2a2uAuhinIhMfv fMd7/6r30brRUQ7POoY+v8HKI8qLDTkuVlIlUNQUvUDqOA7NefiKGI/RJ/WfV+T6077k T2wjAY99mddfe10GW0eYHX1HXBzVBFfqpcuemWFI7Kc93Hs5tFc7NW3NvH7ZyOBoscLQ Fq4PFiZxNqEsKQ8j6cKs7Vs80QGKAFWZER3U+a7LNE0qY7SprifQzG8bAjombMs734P+ NQjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709622922; x=1710227722; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2P9363r70wjkK97Zzcx9SeDd7MXg+Y/HMujYcgQqz9E=; b=A8hPoxfko/MXgxJvgy+iMqXDJaNH2URNnxiJpx5SJVw+Jh/hGdh9Q0CqpQ/+Ac39Zh oMlz9bU6RGmlzy5CGaOhK3Kj6UlgvxSIRlH0pFmhzoTJhwTZ/OBruKHgKIzC8lTjxTM8 AvpKoxgUysJj10pvL3cUkThPsBw3tVEjtGuN1q3xngqTZL4m+letFAy3O4CI1D4+KQz4 h0sl8DW5bzCSKg1L+le6qbsMtgBDUJp/kb2mwb9IML0HcTFXjB5ph/YlGKd3HngXJVVk hXNmA8ekn4MFf2l1ZCGIgGYP0Fdf2ttdQHfOXfZoOUnczMbUoR/QA6WsuR53Hin1LqOZ E6XQ== X-Gm-Message-State: AOJu0YydBmD2ioer7OHGXbG5dxWzCb8c8b3VcvCgYT4TnHxTgSQrYgIO YGVn8eYoJgiz2GZJm5KIsVDkLpFeVf+70NpTIHcq0IxsFFOP1QA3mO2LoMN8 X-Google-Smtp-Source: AGHT+IEe83FmM7GE4GRAMYf5paEz27a610ooyEgtJ7dlwTUeog+hlPsAOIGJSMATjTqpL9PxCrX05A== X-Received: by 2002:a17:906:b7c7:b0:a43:14db:343 with SMTP id fy7-20020a170906b7c700b00a4314db0343mr7814641ejb.38.1709622921787; Mon, 04 Mar 2024 23:15:21 -0800 (PST) Received: from dj3ntoo (30.sub-97-147-14.myvzw.com. [97.147.14.30]) by smtp.gmail.com with ESMTPSA id lf12-20020a170906ae4c00b00a3f27031d7bsm5649231ejb.104.2024.03.04.23.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 23:15:21 -0800 (PST) Date: Tue, 5 Mar 2024 01:15:15 -0600 From: Oskari Pirhonen To: Simon Rowe Cc: "grub-devel@gnu.org" Subject: Re: [PATCH] Support dropin files for Linux kernel parameters Message-ID: Mail-Followup-To: Simon Rowe , "grub-devel@gnu.org" References: <20240301154350.149056-1-simon.rowe@nutanix.com> MIME-Version: 1.0 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=xxc3ncoredxx@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Content-Type: multipart/mixed; boundary="===============6997240719863984647==" Errors-To: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org Sender: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org --===============6997240719863984647== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1I7HwThR2R32bp95" Content-Disposition: inline --1I7HwThR2R32bp95 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 04, 2024 at 09:04:04 +0000, Simon Rowe wrote: > On 02/03/2024, 03:21, "Oskari Pirhonen" wrote: >=20 > > Would it be better to have the kernel command line args in GRUB config = override the ones in > > any drop-ins? At least for me it would be surprising behavior if my dis= tro set something in > > /usr/lib/kernel.d/ and changing that value in my GRUB config didn't hav= e an effect. >=20 > That then makes it impossible for an admin to override any parameter > present in GRUB_CMDLINE_LINUX as that takes priority over files in > either /etc/kernel.d/ or /usr/lib/kernel.d/ >=20 > In my hubris I imagine that distros would move all static or > install-time config to /usr/lib/kernel.d/ and GRUB_CMDLINE_LINUX would > be left just for backward compatibility. >=20 I imagine such a distro would ship their GRUB config with nothing set in GRUB_CMDLINE_LINUX and only use /usr/lib/kernel.d/ for that. Then the admin doesn't have to worry about overriding things in GRUB directly and can use /etc/kernel.d/ instead. If the distro makes use of GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX_RECOVERY to create different command lines, the admin may still have to edit those by hand if they want custom options specific to normal and "recovery" entries. After all, this behavior isn't replicated by just slurping the files from {/usr/lib,/etc}/kernel.d/ and tacking them on to the end. > If a distro carries this change then the docs telling users how to set > their own parameters would need updating to mention /etc/kernel.d/ > instead of GRUB_CMDLINE_LINUX. >=20 > I can switch the order if that's the preferred behaviour, but I feel > it diminishes the usefulness of the feature. >=20 The main points that I currently disagree with are: 1. GRUB_CMDLINE_LINUX [should] be left just for backward compatibility 2. [switching the order] diminishes the usefulness of the feature I believe they can both coexist if a distro documents their preferred/supported way of setting the kernel command line (if they have one). This can even be added as a comment in the installed /etc/default/grub so that anyone going to edit the file will run across it and (hopefully) adapt accordingly. Diverging from the distro's policy is always at the discretion of the system administrator, and I believe that the friendliest option for GRUB is to maintain existing behavior as much as possible in these cases. But feel free to wait for additional comments before sending a v2 with the order changed. - Oskari PS: I was unable to find references to either /usr/lib/kernel.d/ or /etc/kernel.d/ being used after a brief search online, so I presume that they are to be provided by the distro's kernel package(s). --1I7HwThR2R32bp95 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCZebGfgAKCRCp8he9GGIf EQ6aAP4jYgw1hCb+H+J1Sk6Oq5seyclcNTeqRSs0/f2RCMg8VQEA+OrNR6531GDM 2L8EO3/e63HYchUyuKJuirG7MPmGpQ4= =OIp3 -----END PGP SIGNATURE----- --1I7HwThR2R32bp95-- --===============6997240719863984647== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR3J1Yi1kZXZl bCBtYWlsaW5nIGxpc3QKR3J1Yi1kZXZlbEBnbnUub3JnCmh0dHBzOi8vbGlzdHMuZ251Lm9yZy9t YWlsbWFuL2xpc3RpbmZvL2dydWItZGV2ZWwK --===============6997240719863984647==--