Documentation
¶
Overview ¶
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- func CalculatePCR0(ctx context.Context, fw *uefi.UEFI, flow bootflowtypes.Flow, ...) ([]byte, error)
- func ExtractResultingBootFlow(log bootengine.Log) bootflowtypes.Flow
- func SimulateBootProcess(ctx context.Context, biosImg *biosimage.BIOSImage, ...) *bootengine.BootProcess
- type Issue
- func CalculateCBnT0TACMPolicyStatus(ctx context.Context, originalFW *uefi.UEFI, _ uint64, actualImage []byte, ...) (retACMPS *registers.ACMPolicyStatus, retIssues []Issue, retErr error)
- func GetFixedHostConfiguration(ctx context.Context, originalFW *uefi.UEFI, actualImageOffset uint64, ...) (retRegs registers.Registers, retIssues []Issue, retErr error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePCR0 ¶
func CalculatePCR0( ctx context.Context, fw *uefi.UEFI, flow bootflowtypes.Flow, statusRegisters registers.Registers, hashAlgo tpm2.Algorithm, ) ([]byte, error)
CalculatePCR0 calculates PCR0 value
TODO: Delete this function. It is just a function for an intermediate
of the code while migrating it from `pcr` to `bootflow`.
func ExtractResultingBootFlow ¶
func ExtractResultingBootFlow(log bootengine.Log) bootflowtypes.Flow
ExtractResultingBootFlow returns the simplest bootflow, which results into equivalent of what happened according to the log.
TODO: delete this, this is an intermediate code while migrating from `pcr` to `bootflow`:
func SimulateBootProcess ¶
func SimulateBootProcess( ctx context.Context, biosImg *biosimage.BIOSImage, registers registers.Registers, flow bootflowtypes.Flow, ) *bootengine.BootProcess
SimulateBootProcess returns the result of boot flow simulation.
TODO: Delete this function. It is just a function for an intermediate
of the code while migrating it from `pcr` to `bootflow`.
Types ¶
type Issue ¶
type Issue error
Issue is a non-critical problem
func CalculateCBnT0TACMPolicyStatus ¶
func CalculateCBnT0TACMPolicyStatus( ctx context.Context, originalFW *uefi.UEFI, _ uint64, actualImage []byte, regs registers.Registers, eventLog *tpmeventlog.TPMEventLog, hostPCR0 []byte, ) (retACMPS *registers.ACMPolicyStatus, retIssues []Issue, retErr error)
CalculateCBnT0TACMPolicyStatus tries to obtain ACM_POLICY_STATUS register from the host configuration using bruteforcing tehniques
TODO: Delete this function. It is just a function for an intermediate
of the code while migrating it from `pcr` to `bootflow`.
func GetFixedHostConfiguration ¶
func GetFixedHostConfiguration( ctx context.Context, originalFW *uefi.UEFI, actualImageOffset uint64, actualImage []byte, regs registers.Registers, eventLog *tpmeventlog.TPMEventLog, hostPCR0 []byte, ) (retRegs registers.Registers, retIssues []Issue, retErr error)
GetFixedHostConfiguration returns fixed host configuration elements
TODO: Delete this function. It is just a function for an intermediate
of the code while migrating it from `pcr` to `bootflow`.