freebsd-dev/sys/arm64
Mark Johnston a54370f4ab arm64: Ensure that thread0's PCB flags are initialized
On arm64, the PCB is stored at the top of the thread stack.  For thread0
this comes from the static "initstack" region, which is placed in the
.init_pagetable section, which is not part of the BSS and thus doesn't
get zeroed by locore.  (See the comment in ldscript.arm64.)  It is thus
possible for the pcb_flags field to be uninitialized, which can result
in PCB_SINGLE_STEP being set.

Fix this by simply initializing the field.  A separate commit will move
initstack out of the .init_pagetable section, since it has no reason to
be there, but it is preferable to explicitly initialize PCB fields
anyway.  In particular, regular kernel stacks are not zeroed upon
allocation, so we should be consistent here.

Reviewed by:	andrew
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org/D39343
2023-03-31 09:50:34 -04:00
..
acpica acpica: Merge ACPICA 20221020 2022-10-27 22:04:32 -04:00
arm64 arm64: Ensure that thread0's PCB flags are initialized 2023-03-31 09:50:34 -04:00
broadcom Mechanically convert genet(4) to IfAPI 2023-01-31 16:26:34 -05:00
cavium arm64: fix the LINT-ACPI build 2023-03-07 11:37:31 -06:00
conf arm64: add a GENERIC-KASAN config 2023-03-23 16:34:33 -05:00
coresight arm64: coresight: fix the build without FDT 2022-09-29 14:33:33 -05:00
freescale/imx arm/arm64 freescale: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
include arm64: Remove duplicated function prototypes for PAC 2023-03-27 08:56:22 -04:00
intel arm64 intel: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
iommu Remove an unneeded CTASSERT in the smmu driver 2023-03-16 16:45:42 +00:00
linux linux(4): Reduce code duplication between MD files 2023-03-04 12:11:38 +03:00
nvidia/tegra210 sys: Nuke double-semicolons 2022-11-02 09:34:20 -06:00
qoriq Map arm64 pci config memory as non-posted 2023-03-05 20:17:21 +00:00
qualcomm arm/arm64 qualcomm: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
rockchip Map arm64 pci config memory as non-posted 2023-03-05 20:17:21 +00:00