1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
freebsd/sys/rpc/rpcsec_tls
Mark Johnston 02e3eb8d48 mbuf: Only allow extpg mbufs if the system has a direct map
Some upcoming changes will modify software checksum routines like
in_cksum() to operate using m_apply(), which uses the direct map to
access packet data for unmapped mbufs.  This approach of course does not
work on platforms without a direct map, so we have to disallow the use
of unmapped mbufs on such platforms.

I believe this is the right tradeoff: we only configure KTLS on amd64
and arm64 today (and one KTLS consumer, NFS TLS, requires a direct map
already), and the use of unmapped mbufs with plain sendfile is a recent
optimization.  If need be, m_apply() could be modified to create
CPU-private mappings of extpg mbuf pages as a fallback.

So, change mb_use_ext_pgs to be hard-wired to zero on systems without a
direct map.  Note that PMAP_HAS_DMAP is not a compile-time constant on
some systems, so the default value of mb_use_ext_pgs has to be
determined during boot.

Reviewed by:	jhb
Discussed with:	gallatin
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit fcaa890c44)
2021-11-29 20:34:54 -05:00
..
auth_tls.c rpc: Make function tables const 2021-08-21 12:10:31 -04:00
rpctls_impl.c mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-29 20:34:54 -05:00
rpctlscd.x Add a new "tlscertname" NFS mount option. 2020-12-23 13:42:55 -08:00
rpctlssd.x