Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.6] HYGON:Support Trusted computing(TC) feature #366

Merged
merged 4 commits into from
Aug 16, 2024

Conversation

chench246
Copy link

Support Trusted computing(TC) feature for hygon CPU

This Trusted computing function modules are implemented inside the hygon CPU:
TPM2.0 module (Trusted Platform Module, international standard);
TCM2.0 module (Trusted Crypto Module, traditional Chinese standard);
TPCM module (Trusted Platform Control Module, emerging Chinese standard);
TDM module (Trusted Dynamic Measuring, private).
The above functional modules can be used to realize the core functions of trusted computing, such as trusted startup, dynamic measurement, trusted storage, trusted reporting, etc.

Reference: https://gitee.com/openeuler/kernel/pulls/10690

hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9B9XS
CVE: NA

---------------------------

TDM(Trusted Dynamic Measurement) is a module designed and implemented by
HYGON in its X86 CPU's embedded secure processor, providing dynamical
measurement service to X86 side aiming at memory that needs to be
protected, e.g. the memory area kernel code resides. With this new feature,
the goal of protecting any specified memory dynamically in the runtime can
be achieved. When the protected memory is modified illegally, TDM will
detect the event immediately and give an alarm in the form of an exception,
meantime, the abnormal information is recorded inside the TDM for
subsequent audit or remote attestation.

The TDM driver mainly implements the following functions:
(1) Send the required memory block information and configuration
information to TDM device for protection;
(2) Manage the further distribution of exceptions when TDM detects illegal
memory modification and an exception is triggered.
(3) Record abnormal information for subsequent audit or attestation.

Signed-off-by: chench <[email protected]>
hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9B9XS
CVE: NA

---------------------------

tdm_kernel_guard is an application that uses HYGON TDM technology
to protect important data in the kernel. Through this application,
the dynamic protection of SCT and IDT is completed in the system.
In the future, more protection objects can be expanded based on this
application

Signed-off-by: chench <[email protected]>
hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9B9XS
CVE: NA

---------------------------

Hygon CPU implemented a firmware-based TPM2 device, which runs on its
internal secure processor named PSP. The device is fully compatible
with TCG TPM2.0 spec (part 1 ~ 4) in the commands level, but underlying
uses an unique private interface in the form of some hardware mailbox
between X86 cores and PSP, which is for sure different from the TIS or CRB
interfaces defined in the PTP spec.

As such, to support this device we need a specialized driver which
handles the basic send and receive operations required by the kernel
TPM core layer. ACPI device info passed from underlying BIOS indicates
the device presence by setting the _HID field (see TCG ACPI Sepcification,
Family 1.2 and 2.0, Chapter 8 "ACPI Device") to "HYGT0101", which
distinguishes it from the rest of devices. If the BIOS does not support
this setting, the driver will not be activated and thus has no impact
to the system at all.

Signed-off-by: chench <[email protected]>
hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9B9XS
CVE: NA

---------------------------

Hygon CPU implemented a firmware-based TCM2 device, which runs on its
internal secure processor named PSP. The device underlying uses an unique
private interface in the form of some hardware mailbox between X86 cores
and PSP, which is for sure different from the TIS or CRB interfaces defined
in the PTP spec.

As such, to support this device we need a specialized driver which handles
the basic send and receive operations required by the kernel TPM core
layer. ACPI device info passed from underlying BIOS indicates the device
presence by setting the _HID field to "HYGT0201", which distinguishes
it from the rest of devices. If the BIOS does not support this setting,
the driver will not be activated and thus has no impact to the system
at all.

Signed-off-by: chench <[email protected]>
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign matrix-wsk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

Hi @chench246. Thanks for your PR. 😃

@deepin-ci-robot
Copy link

Hi @chench246. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Avenger-285714 Avenger-285714 merged commit aad64c3 into deepin-community:linux-6.6.y Aug 16, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants