Page MenuHomeFreeBSD

Have cryptocheck toggle kern.cryptodevallowsoft as needed

Authored by sef on Feb 26 2019, 11:05 PM.



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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Seems unobjectionable to me. Ok by you, John?

114–129 ↗(On Diff #54440)

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

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.
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.
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.