From nobody Fri Oct 24 08:17:52 2025 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 4ctG4822fFz6Dn9d; Fri, 24 Oct 2025 08:18:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ctG4800l7z3P1t; Fri, 24 Oct 2025 08:17:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 59O8Hqw9056319; Fri, 24 Oct 2025 11:17:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 59O8Hqw9056319 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 59O8HqKY056318; Fri, 24 Oct 2025 11:17:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Oct 2025 11:17:52 +0300 From: Konstantin Belousov To: "David E. O'Brien" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d1ca01059d5d - main - padlock(4)/nehemiah: move i386-only entropy source to MD files Message-ID: References: <202510232317.59NNHQMC088762@gitrepo.freebsd.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510232317.59NNHQMC088762@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4ctG4800l7z3P1t On Thu, Oct 23, 2025 at 11:17:26PM +0000, David E. O'Brien wrote: > The branch main has been updated by obrien: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d1ca01059d5d756a4aef09d955e98aa59a284344 > > commit d1ca01059d5d756a4aef09d955e98aa59a284344 > Author: David E. O'Brien > AuthorDate: 2025-10-23 22:27:06 +0000 > Commit: David E. O'Brien > CommitDate: 2025-10-23 23:17:19 +0000 > > padlock(4)/nehemiah: move i386-only entropy source to MD files Why do you think that padlock was implemented on 32bit only VIA CPUs? I believe that VIA NANO supported both x86-64 and padlock. And wikipedia (sorry) seems to confirm this https://en.wikipedia.org/wiki/VIA_Nano > > Reviewed by: khng > Differential Revision: https://reviews.freebsd.org/D53309 > --- > sys/amd64/conf/GENERIC | 1 - > sys/amd64/conf/MINIMAL | 1 - > sys/conf/files.i386 | 1 + > sys/conf/files.x86 | 1 - > sys/i386/conf/NOTES | 7 +++++++ > sys/modules/Makefile | 4 +++- > sys/x86/conf/NOTES | 1 - > 7 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC > index 2e41ed26403a..fb8473505128 100644 > --- a/sys/amd64/conf/GENERIC > +++ b/sys/amd64/conf/GENERIC > @@ -309,7 +309,6 @@ device wpi # Intel 3945ABG wireless NICs. > device crypto # core crypto support > device aesni # AES-NI OpenCrypto module > device loop # Network loopback > -device padlock_rng # VIA Padlock RNG > device rdrand_rng # Intel Bull Mountain RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL > index 0baf6d6431de..61c713c609a4 100644 > --- a/sys/amd64/conf/MINIMAL > +++ b/sys/amd64/conf/MINIMAL > @@ -113,7 +113,6 @@ device uart # Generic UART driver > > # Pseudo devices. > device loop # Network loopback > -device padlock_rng # VIA Padlock RNG > device rdrand_rng # Intel Bull Mountain RNG > device ether # Ethernet support > > diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 > index 41c51a7aa9c5..e6c2089e2c1e 100644 > --- a/sys/conf/files.i386 > +++ b/sys/conf/files.i386 > @@ -33,6 +33,7 @@ dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv > dev/le/if_le_isa.c optional le isa > dev/ofw/ofw_pcib.c optional fdt pci > dev/pcf/pcf_isa.c optional pcf > +dev/random/nehemiah.c optional padlock_rng !random_loadable > dev/sbni/if_sbni.c optional sbni > dev/sbni/if_sbni_isa.c optional sbni isa > dev/sbni/if_sbni_pci.c optional sbni pci > diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 > index 21a1b8046f12..31b8e88a6951 100644 > --- a/sys/conf/files.x86 > +++ b/sys/conf/files.x86 > @@ -310,7 +310,6 @@ dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw > dev/ntb/test/ntb_tool.c optional ntb_tool > dev/nvram/nvram.c optional nvram isa > dev/random/ivy.c optional rdrand_rng !random_loadable > -dev/random/nehemiah.c optional padlock_rng !random_loadable > dev/random/rdseed.c optional rdrand_rng !random_loadable > dev/qat_c2xxx/qat.c optional qat_c2xxx > dev/qat_c2xxx/qat_ae.c optional qat_c2xxx > diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES > index 93dc00634cc0..fbcea76527db 100644 > --- a/sys/i386/conf/NOTES > +++ b/sys/i386/conf/NOTES > @@ -302,6 +302,13 @@ envvar hint.pcf.0.irq="5" > # > device glxsb # AMD Geode LX Security Block > > +# > +# padlock is a driver for the cryptographic functions and RNG in > +# VIA C3, C7, and Eden processors. > +# Requires 'device crypto'. > +# > +device padlock_rng # VIA Padlock RNG > + > ##################################################################### > # ABI Emulation > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > index 9bc743c0c6d1..cde4c1c0e9ac 100644 > --- a/sys/modules/Makefile > +++ b/sys/modules/Makefile > @@ -819,7 +819,6 @@ _nfe= nfe > _nvram= nvram > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > _padlock= padlock > -_padlock_rng= padlock_rng > _rdrand_rng= rdrand_rng > _rdseed_rng= rdseed_rng > .endif > @@ -892,6 +891,9 @@ _glxsb= glxsb > _pcfclock= pcfclock > _pst= pst > _sbni= sbni > +.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > +_padlock_rng= padlock_rng > +.endif > .endif > > .if ${MACHINE_ARCH} == "armv7" > diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES > index 3b3439b519d7..fadaf90d508f 100644 > --- a/sys/x86/conf/NOTES > +++ b/sys/x86/conf/NOTES > @@ -541,7 +541,6 @@ device smbios > device vpd > device asmc > device tpm > -device padlock_rng # VIA Padlock RNG > device rdrand_rng # Intel Bull Mountain RNG > device aesni # AES-NI OpenCrypto module > device ossl # OpenSSL OpenCrypto module