From nobody Tue Mar 3 19:47:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fQRCk2dWxz6TXfH for ; Tue, 03 Mar 2026 19:47:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fQRCj5xPPz3cYN for ; Tue, 03 Mar 2026 19:47:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-3567e2b4159so3201857a91.0 for ; Tue, 03 Mar 2026 11:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772567247; cv=none; d=google.com; s=arc-20240605; b=jJX6b4Fz8DBlqB0LcWXTBZl8xa8j7YcZu5guHOpjiF2xtTkhWZcmL7orEtmwNnAVOG +WlzrvETNVNwtg00bUVAXtqd+rZcyjHxjS6elOsTU9bWwt7XJR8F4X0CWvuzXYg+NJMX jlwlUOoo4lOHW6DBUQHKXDH6bzmORox8gK+JJSl5E3qiUMnPubLHllKNgKpoBCQEk4IH II69gmRyabo5O/FX76UuhQJ8S12EdjNQj+9783X437iyaNp5gHG6Mq5vYbcwmas/3zg3 I7SF7kNTQnhkch2c7RiOAWTt+VhuT1BDgvr4gbzXboPm/V1Wf5Eb19t0H+6HP688D0MK rZjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=e82ujAwuZLVXawVXxQHQjNxiqL+TXMIyJ+3YKj6n/Gg=; fh=iY9DxeRtWl5svjxSj/KDeDpiqGGfQ/0o9j6Z1xRa6B0=; b=YmfrbA1XIaTVpMY+9IldwuKVEMm8jnwY8gppB3GGgse6v4huvznLgBfWGbnLIv4/Cf 5Tgs1M7l1C4XsBesGpPcurY7i+/S1egqT5CnogBrLabeq2A0DW+1TOHZAVSIOGbf8FZN 1v1cvL6hHBM1wT48+LIj72uBYH42W2H64n0skTyJaYC/P2oBTrJQGAy2FlNoR9foNjb5 qKlm0PTI6iUyCrnfx/s1YfLqdYeEy6qHGa9uV8RP0RKpdxvO8gJ8GtztWZwjUthOavb2 tc/JhCnyAsIooarxnXFuICN9nsVUfomi3X+v6IgAyQ4pewAmFvkKNpBguqHpKkgj8vo8 Yuog==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1772567247; x=1773172047; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=e82ujAwuZLVXawVXxQHQjNxiqL+TXMIyJ+3YKj6n/Gg=; b=yRW0uyWcsk6cxZos9l/ormUVMQSz01dyfQ7dvb2i1QzmGqTKM6GLUTl5H1IsTZcjZ3 S3JZV7titpldoufMcGBqU25zH37a5qdQlcBdmvPMDYmOAzY/aVxh3aZI/YuzcIMspDGF CMEwvBRan1bC+oxqePPT4jknWN4VqHRZe2gDqChZTclWpfF3ykkg3ID66qnOxakBJLmY gBwG/tyi0PIthkE6vv8p1hA5wIEoDxpJ/fFWMgizKghTjVgBrtFKg2DGXV0BM7mcXx/G VZF26VWrlY1zZsPSZp8fuSh13P8mQG4fQ0+11B0gOacS+PMGV8W5kkRgrwPRiwS42OFP zIMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772567247; x=1773172047; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=e82ujAwuZLVXawVXxQHQjNxiqL+TXMIyJ+3YKj6n/Gg=; b=wP8jzzLAj0unbYc6K3iAl3itTWss4aerZ5mlKgdKwenhuSnW/ztM6cxE3Yve9RZyNp U0aZtm8u5rR7YV/9Vm7o6U7pLrOmhDGeQ4RxX2yQeZxWngoHVtNyruvmeBfCvsdo8p7o 8C7tp5Hp+yZvi3B+K3coTuY8aii63tXZL9/HBLbFQr4cC0mU+KKxFHVIuxlKB9Bwt1rk bYiIFo06pC3NfvgJtiqZp5FtDQQ+QJ7qIQYJ+MbuyVE1xQIGjOr09Ges1b2YVdoQn4eI k56GuylppfbwRMH/4TOXp2E5l7eHQ0wkUYSArFsXKLu4gXJgjgqXKwmu6cU1ZQ5q+w2p /v6g== X-Forwarded-Encrypted: i=1; AJvYcCXaU+tpsdK3qIrvsdAHjWIiM/KSoN+vPacxhbz/OaxqW9oboYDWEE9XX1eOe5UUC9mpSDci4SmxPNdgscs+YV4wroNJ@freebsd.org X-Gm-Message-State: AOJu0Yx7YpP9FM8M/5g25RDskz27uJFR2B8FfBw+oeAAAoUCFI5c/Edy pnuBYzwk9K931+xKdsM14Oe00pCwRGe3l6Q1ouy198BXnKX6jOhCE3vLnQ8qpo/jsnXIIpiXpyJ ZqLrktr2EHH6XwN4/Vo4tLfvOFXZ4fRySRpW3x9easw== X-Gm-Gg: ATEYQzw/Mbh7fFhYMlctY+NncUTL/OZuqgpDu3pxGoLOO+/2zbNUXsbBW2eYnloTJsw SVQ5UsL6kfrREfnHlYmXPxE59q/oevQrsmOFrpF9Zm0H/RQd8J1BhqzIQVOf39OA144lo3LpXUM z0RdjzM2Z8g03FsVah8QNyOukLIYAw5dP5GAZfOtF3cl3sneripTRQPbgutAgAREjAD+zhqmgMg d04WuOFpa4L32w6dTqOdqFHMf59c209dcLR6smuB2BO0TfwKeUO6GpfdD4GtqyOVZ20knFbxwxn b+gV3vlYI8UGHQV6Rw== X-Received: by 2002:a17:90b:2ecd:b0:359:9b45:7754 with SMTP id 98e67ed59e1d1-3599b4587b7mr2906989a91.32.1772567247129; Tue, 03 Mar 2026 11:47:27 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <69a668aa.3785e.4a16f236@gitrepo.freebsd.org> <1s9oq316-3q4o-9273-3qos-3n3o793ns725@mnoonqbm.arg> <947orn62-43rq-383n-son8-90o6q2275os6@serrofq.bet> In-Reply-To: <947orn62-43rq-383n-son8-90o6q2275os6@serrofq.bet> From: Warner Losh Date: Tue, 3 Mar 2026 12:47:16 -0700 X-Gm-Features: AaiRm53Zv_tKorRK-ITXGCK2iLNbhnoxjz7oT4KC0khoMQy3jRReZIYIIZx_ELo Message-ID: Subject: Re: git: c47cefba8312 - main - Only build USB-related modules if MK_USB != no To: "Bjoern A. Zeeb" Cc: Enji Cooper , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001b1ce5064c23f90e" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fQRCj5xPPz3cYN X-Spamd-Bar: ---- --0000000000001b1ce5064c23f90e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 3, 2026 at 12:25=E2=80=AFPM Bjoern A. Zeeb wro= te: > On Tue, 3 Mar 2026, Warner Losh wrote: > > > On Tue, Mar 3, 2026 at 11:29=E2=80=AFAM Bjoern A. Zeeb = wrote: > > > >> On Tue, 3 Mar 2026, Enji Cooper wrote: > >> > >>> The branch main has been updated by ngie: > >>> > >>> URL: > >> > https://cgit.FreeBSD.org/src/commit/?id=3Dc47cefba831240a1b3de375f18134b9= 3cf998f5c > >>> > >>> commit c47cefba831240a1b3de375f18134b93cf998f5c > >>> Author: Enji Cooper > >>> AuthorDate: 2026-03-03 04:49:54 +0000 > >>> Commit: Enji Cooper > >>> CommitDate: 2026-03-03 04:50:03 +0000 > >>> > >>> Only build USB-related modules if MK_USB !=3D no > >>> > >>> This change moves the thunderbolt module and other USB modules > under a > >>> MK_USB !=3D no conditional to ensure that users not desiring USB > support > >>> can easily build systems without USB-specific drivers using this > knob. > >>> > >>> MFC after: 1 week > >>> Reviewed By: imp > >>> Differential Revision: https://reviews.freebsd.org/D55576 > >>> --- > >>> sys/conf/kern.opts.mk | 5 +++++ > >>> sys/conf/kmod.mk | 8 ++++++-- > >>> sys/modules/Makefile | 16 ++++++++++------ > >>> 3 files changed, 21 insertions(+), 8 deletions(-) > >> > >> There is a hige load of further devices which depend on USB which are > not > >> part of the current set excluded; I assume they will now break with > >> dependency > >> issues if USB is no longer built but these modules are built. > >> > >> Is there any plan to also "hide" all the other modules? > >> > > > > As I said in my review, I'm generally uneasy about this trend... > > I never got that far as the review diff I looked at was broken at that > point. > > This may also be wrong: > > % ls -l tools/build/options/*USB* > -rw-r--r-- 1 bz bz 49 Mar 21 2025 tools/build/options/WITHOUT_USB > -rw-r--r-- 1 bz bz 40 Mar 21 2025 > tools/build/options/WITHOUT_USB_GADGET_EXAMPLES > -rw-r--r-- 1 bz bz 33 Mar 21 2025 > tools/build/options/WITH_USB_GADGET_EXAMPLES > % cat tools/build/options/WITHOUT_USB > Do not build USB-related programs and libraries. > > > Usually we used to have a FOO_SUPPORT which would then also not build > kernel > modules or not build FOO suport into (programs, libraries, and) kernel > modules, > e.g. INET, INET6, NETGRAPH. > > Though, unless INET and INET6 started to become loadable seems wrong thes= e > days > and I'd use a check based on the kernel config (which I believe came year= s > later > as an option) and remove the entire MK_INET[6]_SUPPORT checks for the > kernel. > > The NETGRAPH example is a bad one as it seems to be unimplemeted for the > kernel > side so NETGRAPH_SUPPORT description is misleading. > > > USB tends to be more tricky as it is fully loadable but then then answer > for people who don't want a system supporting USB would mean removing > all the modules (which we cannot do based on the kernel config). > > The question then remains whether a src.conf based knob is the right > thing and which one it should be. MK_USB seems wrong but more knobs do > not make it better as we have too many of them these days if you ask me. > > The answer may simply be to rm the modules if a system does not want/need > them. I kind-of see that as a rare special-case problem and if someone > really needs to ship a system like that then they may have to go the > extra length and maintain that bit? > > If we were really to support this in the build system then we should make > sure that all USB modules are no longer build. > > > Given I had my fingers in the USB modules list (though not the full one) > recently "uneasy" is maybe not enough for the feeling in my stomach. > Given all this, maybe we should revert this change and move the discussion to arch@. The USB vs USB_SUPPORT nails a lot of my uneasiness here. Warner --0000000000001b1ce5064c23f90e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Mar 3, = 2026 at 12:25=E2=80=AFPM Bjoern A. Zeeb <bz@freebsd.org> wrote:
On Tue, 3 Mar 2026, Warner Losh wrote:

> On Tue, Mar 3, 2026 at 11:29=E2=80=AFAM Bjoern A. Zeeb <bz@freebsd.org> wrote:
>
>> On Tue, 3 Mar 2026, Enji Cooper wrote:
>>
>>> The branch main has been updated by ngie:
>>>
>>> URL:
>> https://c= git.FreeBSD.org/src/commit/?id=3Dc47cefba831240a1b3de375f18134b93cf998f5c
>>>
>>> commit c47cefba831240a1b3de375f18134b93cf998f5c
>>> Author:=C2=A0 =C2=A0 =C2=A0Enji Cooper <ngie@FreeBSD.org>= ;
>>> AuthorDate: 2026-03-03 04:49:54 +0000
>>> Commit:=C2=A0 =C2=A0 =C2=A0Enji Cooper <ngie@FreeBSD.org>= ;
>>> CommitDate: 2026-03-03 04:50:03 +0000
>>>
>>>=C2=A0 =C2=A0 Only build USB-related modules if MK_USB !=3D no<= br> >>>
>>>=C2=A0 =C2=A0 This change moves the thunderbolt module and othe= r USB modules under a
>>>=C2=A0 =C2=A0 MK_USB !=3D no conditional to ensure that users n= ot desiring USB support
>>>=C2=A0 =C2=A0 can easily build systems without USB-specific dri= vers using this knob.
>>>
>>>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 1 week
>>>=C2=A0 =C2=A0 Reviewed By:=C2=A0 =C2=A0 imp
>>>=C2=A0 =C2=A0 Differential Revision:
https://reviews.f= reebsd.org/D55576
>>> ---
>>> sys/conf/kern.opts.mk |=C2=A0 5 +++++
>>> sys/conf/kmod.mk=C2=A0 =C2=A0 =C2=A0 |=C2=A0 8 ++++++--
>>> sys/modules/Makefile=C2=A0 | 16 ++++++++++------
>>> 3 files changed, 21 insertions(+), 8 deletions(-)
>>
>> There is a hige load of further devices which depend on USB which = are not
>> part of the current set excluded;=C2=A0 I assume they will now bre= ak with
>> dependency
>> issues if USB is no longer built but these modules are built.
>>
>> Is there any plan to also "hide" all the other modules?<= br> >>
>
> As I said in my review, I'm generally uneasy about this trend...
I never got that far as the review diff I looked at was broken at that poin= t.

This may also be wrong:

% ls -l tools/build/options/*USB*
-rw-r--r--=C2=A0 1 bz bz 49 Mar 21=C2=A0 2025 tools/build/options/WITHOUT_U= SB
-rw-r--r--=C2=A0 1 bz bz 40 Mar 21=C2=A0 2025 tools/build/options/WITHOUT_U= SB_GADGET_EXAMPLES
-rw-r--r--=C2=A0 1 bz bz 33 Mar 21=C2=A0 2025 tools/build/options/WITH_USB_= GADGET_EXAMPLES
% cat tools/build/options/WITHOUT_USB
Do not build USB-related programs and libraries.


Usually we used to have a FOO_SUPPORT which would then also not build kerne= l
modules or not build FOO suport into (programs, libraries, and) kernel modu= les,
e.g. INET, INET6, NETGRAPH.

Though, unless INET and INET6 started to become loadable seems wrong these = days
and I'd use a check based on the kernel config (which I believe came ye= ars later
as an option) and remove the entire MK_INET[6]_SUPPORT checks for the kerne= l.

The NETGRAPH example is a bad one as it seems to be unimplemeted for the ke= rnel
side so NETGRAPH_SUPPORT description is misleading.


USB tends to be more tricky as it is fully loadable but then then answer for people who don't want a system supporting USB would mean removing all the modules (which we cannot do based on the kernel config).

The question then remains whether a src.conf based knob is the right
thing and which one it should be.=C2=A0 MK_USB seems wrong but more knobs d= o
not make it better as we have too many of them these days if you ask me.
The answer may simply be to rm the modules if a system does not want/need them.=C2=A0 I kind-of see that as a rare special-case problem and if someon= e
really needs to ship a system like that then they may have to go the
extra length and maintain that bit?

If we were really to support this in the build system then we should make sure that all USB modules are no longer build.


Given I had my fingers in the USB modules list (though not the full one) recently "uneasy" is maybe not enough for the feeling in my stoma= ch.

Given all this, maybe we should rev= ert this change and move the discussion
to arch@. The USB vs USB_= SUPPORT nails a lot of my uneasiness here.

Warner= =C2=A0
--0000000000001b1ce5064c23f90e--