Page MenuHomeFreeBSD

Have cryptocheck toggle kern.cryptodevallowsoft as needed
ClosedPublic

Authored by sef on Feb 26 2019, 11:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 1:50 AM
Unknown Object (File)
Wed, Dec 11, 3:20 PM
Unknown Object (File)
Thu, Dec 5, 4:46 PM
Unknown Object (File)
Wed, Dec 4, 2:49 AM
Unknown Object (File)
Oct 28 2024, 10:30 PM
Unknown Object (File)
Oct 4 2024, 8:32 AM
Unknown Object (File)
Oct 3 2024, 12:32 PM
Unknown Object (File)
Oct 2 2024, 10:53 PM
Subscribers

Details

Summary

If '-d soft' is given, have it set kern.cryptodevallowsoft to 1 if needed (and use atexit to set it back to 0 if that's how it started out).

I did not set up any signal handlers, however.

Test Plan

sysctl kern.cryptodevallowsoft
sudo cryptocheck -A 0 -a aes-gcm -d soft 100
sysctl kern.cryptodevallowsoft

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Seems unobjectionable to me. Ok by you, John?

tools/tools/crypto/cryptocheck.c
114–129 ↗(On Diff #54440)

sys/ includes sort to the top; sys/types.h is redundant due to sys/param.h, per style(9).

tools/tools/crypto/cryptocheck.c
114–129 ↗(On Diff #54440)

Ok, but that's straight out of the man page for sysctlbyname(3).

Move the #includes around per cem.

jhb added inline comments.
tools/tools/crypto/cryptocheck.c
129 ↗(On Diff #54442)

Extra blank line is a minor nit.

293 ↗(On Diff #54442)

Maybe call this 'enable_user_soft' instead of 'check'.

This revision is now accepted and ready to land.Feb 27 2019, 6:38 PM
sef marked an inline comment as done.Feb 27 2019, 6:52 PM
sef added inline comments.
tools/tools/crypto/cryptocheck.c
129 ↗(On Diff #54442)

Ah, caused by when I move the <sys/> line around. Fixed :).

Feedback from jhb. (Just uploaded for completeness sake; I'll be checking it in after I update my svn source, apply the patch, and do a buildworld just to make sure I didn't do anything stupid again.)

This revision now requires review to proceed.Feb 27 2019, 6:53 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 27 2019, 7:27 PM
This revision was automatically updated to reflect the committed changes.