9elements / converged-security-suite

Converged Security Suite for Intel & AMD platform security features
https://www.9esec.io
BSD 3-Clause "New" or "Revised" License
56 stars 15 forks source link

Feature/arch 386 #328

Closed xaionaro closed 2 years ago

xaionaro commented 2 years ago

Test plan

before

[xaionaro@void converged-security-suite]$ GOARCH=386 go build ./cmd/pcr0tool
# github.com/9elements/converged-security-suite/v2/pkg/uefi
pkg/uefi/uefi.go:94:42: constant 4294967296 overflows int
pkg/uefi/uefi.go:101:42: constant 4294967296 overflows int
# github.com/9elements/go-linux-lowlevel-hw/pkg/hwapi
/home/xaionaro/go-fbcode-3rdparty/pkg/mod/github.com/9elements/go-linux-lowlevel-hw@v0.0.0-20211215141225-8375dd201aae/pkg/hwapi/acpi.go:508:31: cannot use h (type HwAPI) as type LowLevelHardwareInterfaces in argument to GetACPITableSysFS:
    HwAPI does not implement LowLevelHardwareInterfaces (missing ReadPhys method)
/home/xaionaro/go-fbcode-3rdparty/pkg/mod/github.com/9elements/go-linux-lowlevel-hw@v0.0.0-20211215141225-8375dd201aae/pkg/hwapi/acpi.go:510:32: cannot use h (type HwAPI) as type LowLevelHardwareInterfaces in argument to GetACPITableDevMem:
    HwAPI does not implement LowLevelHardwareInterfaces (missing ReadPhys method)
/home/xaionaro/go-fbcode-3rdparty/pkg/mod/github.com/9elements/go-linux-lowlevel-hw@v0.0.0-20211215141225-8375dd201aae/pkg/hwapi/api.go:56:14: cannot use HwAPI{} (type HwAPI) as type LowLevelHardwareInterfaces in return argument:
    HwAPI does not implement LowLevelHardwareInterfaces (missing ReadPhys method)
/home/xaionaro/go-fbcode-3rdparty/pkg/mod/github.com/9elements/go-linux-lowlevel-hw@v0.0.0-20211215141225-8375dd201aae/pkg/hwapi/iommu.go:148:24: cannot use h (type HwAPI) as type LowLevelHardwareInterfaces in argument to lookupIOLegacy:
    HwAPI does not implement LowLevelHardwareInterfaces (missing ReadPhys method)
[xaionaro@void converged-security-suite]$

after

[xaionaro@void converged-security-suite]$ GOARCH=386 go build ./cmd/pcr0tool
[xaionaro@void converged-security-suite]$ ./pcr0tool
error: no command specified

syntax: pcr0tool <command> [options] {arguments}

Possible commands:
    pcr0tool dump_registers                      dump status registers from /dev/mem and /dev/cpu/0/msr. Works only on Linux
    pcr0tool printnodes <firmware>               dump UEFI tree nodes
    pcr0tool sum <firmware>                      calculate the expected value of PCR0 for a specified firmware image
    pcr0tool diff <firmware_good> <firmware_bad> find the reason of different PCR0 values between two firmware images
    pcr0tool display_eventlog                    display TPM Event Log
    pcr0tool display_fwinfo <path to the image>  display information about firmware image
    pcr0tool dump_fit <firmware>                 dump FIT entries
ChriMarMe commented 2 years ago

This got closed due to change of default branch from master to main. Rebase on main and rename branch, open PR again is a legit move here.