FreeBSD Errata Notice FreeBSD-EN-22:07.la57

From: FreeBSD Errata Notices <errata-notices_at_freebsd.org>
Date: Tue, 01 Feb 2022 22:10:08 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-EN-22:07.la57                                           Errata Notice
                                                          The FreeBSD Project

Topic:		Intel CPU LA57 boot failure

Category:       core
Module:         kernel
Announced:      2022-02-01
Affects:        FreeBSD 13.0
Corrected:      2021-05-03 01:27:22 UTC (stable/13, 13.0-STABLE)
                2022-02-01 17:43:46 UTC (releng/13.0, 13.0-RELEASE-p7)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit
<URL:https://security.FreeBSD.org/>.

I.   Background

Recent Intel x86-64 CPUs support 5-level paging, extending the size of the
virtual address space to 57 bits.  The extension is enabled by setting a bit
known as LA57 in a control register, and switching to 5-level paging during
boot.

II.  Problem Description

LA57 support was tested on and is functional within QEMU, but fails on
physical hardware.

III. Impact

The kernel fails to boot on Intel CPUs that support LA57.

IV.  Workaround

LA57 may be disabled by adding the following to /boot/loader.conf:

  vm.pmap.la57=0

This may also be set from the loader prompt (i.e., for initial boot or
installation).

V.   Solution

Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.

After update LA57 will be disabled by default.  5-level paging will be fully
supported in a future FreeBSD release.

Perform one of the following:

1) To update your system via a binary patch:

Systems running a RELEASE version of FreeBSD on the amd64, i386, or
(on FreeBSD 13 and later) arm64 platforms can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

2) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/EN-22:07/la57.patch
# fetch https://security.FreeBSD.org/patches/EN-22:07/la57.patch.asc
# gpg --verify la57.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile and reinstall your kernel as described in
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html>.

VI.  Correction details

This issue is corrected by the corresponding Git commit hash in the
following stable and release branches:

Branch/path                             Hash                     Revision
- -------------------------------------------------------------------------
stable/13/                              df6241fcef9a    stable/13-n245478
releng/13.0/                            f151464add6f  releng/13.0-n244775
- -------------------------------------------------------------------------

Run the following command to see which files were modified by a
particular commit:

# git show --stat <commit hash>

Or visit the following URL, replacing NNNNNN with the hash:

<URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN>

To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:

# git rev-list --count --first-parent HEAD

VII. References

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-22:07.la57.asc>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE/A6HiuWv54gCjWNV05eS9J6n5cIFAmH5kzIACgkQ05eS9J6n
5cJP+Q//be4jFodkfCtiwKwMNr+1RvGZtopWq0X6g5CQCTIrPtUKqdie3ceOhjRi
zl3vNInfus6iTo0jSBMiWCpj7cI3AekZvwLuDHKp1GWv5WWQivDe6A6sbrGSgIQ2
9MG7RYE7t0L0LVnzTSlHCWXCzTqmpzTXEePw7NqgPhg7J3NtwYLBh5C4MqmScA6Y
vbNzWMGIfa9IJqaDcxxEdqqGoTrv/MEWzVZ7TzM4O8DWIm+oK/5E+qiTk1fSyc/Z
uI6hUMMt7xxP8KkZdlqVODwHzVo6v4kigpNTqNK1epv3nFrL3hJ+e3GhWreV6tkI
XA9pjZT2gyLz+Ryn7QyIzrByrpXKDQK/8nKu9eoQdhDdxN6sWS65PPQKPhzQOemk
qFx3V2oK3UMF7Q2BeF8aDxm48RU8weDACcxn2w6X73VyIHvz1H3MpirxPrcwjm1v
RQJKGUZfnnTfg8zsstVASaj2R2i+Qa0Zk70tbCaXrPH7TB6Cadx6sjBjoLViQYQk
99glmvpc37u2ryW4MKlDNLeae9LnW7jyDMfpGlN3tJ4AD6y+2EcVixiTqAEF8t27
hZgi/3MVUNltCfSUoOol9y/aqaTjxPHTR9HSjrmCnJAWHwmyk33lC4/17kd8Qx0U
bEFufzp/pDwFur7dWJOxVehFHc0/MoOioJHbeN3oNBMQiFdDoRY=
=efkJ
-----END PGP SIGNATURE-----