Re: Removing crypto(9) "opencrypto" and /dev/crypto

Aaron LI <[email protected]> Sun, 10 Aug 2025 22:07:37 +0800
Newsgroups gmane.os.dragonfly-bsd.kernel,gmane.os.dragonfly-bsd.user
Message-ID <[email protected]>

> On Aug 10, 2025, at 21:38, Michael Neumann <[email protected]> wrote:
>=20
> =EF=BB=BFOn Sun, Aug 10, 2025 at 09:59:44AM +0800, Aaron LI wrote:
>>> On 8/8/25 6:20 PM, Michael Neumann wrote:
>>> Hi,
>>=20
>> Hi Michael,
>>=20
>> Great job!
>=20
> Hi Aaron,
>=20
>=20
>>> I'd like to commit the following two patches, removing a lot of "bloat":=

>>>=20
>>> https://leaf.dragonflybsd.org/~mneumann/0001-crypto-remove-dev-crypto-ps=
eudo-device.patch
>>=20
>> Some suggestions:
>>=20
>> 1. UPDATING:
>>   As we're removing 'device cryptodev' from the default kernel config, I
>> suggest we first make 'cryptdev' a no-op and then remove it in a later
>> release.  The UPDATING file said similar notes for the FFS_ROOT option.
>=20
> Thanks for the notice! I am trying to accomplish that with a line
> in sys/conf/files like:
>=20
>    NOOP     optional cryptodev no-obj \
>         warning "device cryptodev removed"
>=20
> And the same for the other removed devices like "aesni", "safe", etc.
>=20
> I just did a "make buildworld" with a "device cryptodev" in the
> kernel config and with this line it succeeds.

Cool!

>>> https://leaf.dragonflybsd.org/~mneumann/0002-opencrypto-remove-in-kernel=
-crypto-9-framework.patch
>>=20
>> Some suggestions:
>>=20
>> 1. Makefile_upgrade.inc
>>   Remove /usr/include/crypto directory,
>>   also remove /boot/kernel/aesni.ko
>>=20
>> 2. Again bump __DragonFly_version, as we're removing
>>   "/usr/include/crypto" and changing kernel API, also the removal of
>> aesni(4) device.
>=20
> Bump it twice?
>=20
> I removed other unused crypto devices ("safe", padlock, hifn, ubsec) in th=
e past without bumping __DragonFly_version. Shall I cover that in a single v=
ersion
> bump, and another one for removing cryptodev, (which includes
> /usr/include/crypto).

It=E2=80=99s no harm to bump the version twice. On the other hand, we could a=
lso commit the removals and finally bump the version in a separate commit.

Regards,
Aaron