From: Jarkko Sakkinen <jarkko(a)kernel.org>
tpm: Enable hwrng only for Pluton on AMD CPUs
The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for
all AMD fTPMs") doesn't work properly on a number of Intel fTPMs. On the
reported systems the TPM doesn't reply at bootup and returns back the
command code. This makes the TPM fail probe on Lenovo Legion Y540 laptop.
Since only Microsoft Pluton is the only known combination of AMD CPU and
fTPM from other vendor, disable hwrng otherwise. In order to make sysadmin
aware of this, print also info message to the klog.
Cc: stable(a)vger.kernel.org
Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs")
Reported-by: Todd Brandt <todd.e.brandt(a)intel.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217804
Reported-by: Patrick Steinhardt <ps(a)pks.im>
Reported-by: Raymond Jay Golo <rjgolo(a)gmail.com>
Reported-by: Ronan Pigott <ronan(a)rjp.ie>
Reviewed-by: Jerry Snitselaar <jsnitsel(a)redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko(a)kernel.org>
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index blahblah..blahblah 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status)
return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE;
}
-static int crb_check_flags(struct tpm_chip *chip)
-{
- u32 val;
- int ret;
-
- ret = crb_request_locality(chip, 0);
- if (ret)
- return ret;
-
- ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val, NULL);
- if (ret)
- goto release;
-
- if (val == 0x414D4400U /* AMD */)
- chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED;
-
-release:
- crb_relinquish_locality(chip, 0);
-
- return ret;
-}
-
static const struct tpm_class_ops tpm_crb = {
.flags = TPM_OPS_AUTO_STARTUP,
.status = crb_status,
@@ -826,9 +804,14 @@ static int crb_acpi_add(struct acpi_device *device)
if (rc)
goto out;
- rc = crb_check_flags(chip);
- if (rc)
- goto out;
+#ifdef CONFIG_X86
+ /* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+ priv->sm != ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON) {
+ dev_info(dev, "Disabling hwrng\n");
+ chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED;
+ }
+#endif /* CONFIG_X86 */
rc = tpm_chip_register(chip);
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2706
From: Prarit Bhargava <prarit(a)redhat.com>
redhat/docs: Add a mention of bugzilla for bugs
RHEL has moved to Jira, and it is important to let users know that Fedora
remains on Bugzilla. Add a section on reporting bugs that points users to
Bugzilla.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/docs/submitting-contributions.rst b/redhat/docs/submitting-contributions.rst
index blahblah..blahblah 100644
--- a/redhat/docs/submitting-contributions.rst
+++ b/redhat/docs/submitting-contributions.rst
@@ -33,6 +33,11 @@ enforced by CI. You can check your changes locally with::
make SPHINXOPTS="-W" html
+Reporting Bugs
+==============
+
+Fedora bugs are only tracked in Red Hat's Bugzilla instance. Fedora kernel bugs can be filed at https://bugzilla.redhat.com/ under Product "Fedora" and Component "kernel". Please try to be as detailed as possible when reporting a bug. The more detailed you are, the more likely it is that your bug will be resolved.
+
Patches
=======
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2715
Hey All,
I would like to invite all of you to participate in the Kernel 6.5
Test week is happening from 2023-09-10 to 2023-09-17. It's
fairly simple, head over to the wiki [0] and read in detail about the
test week and simply run the test case mentioned in[1] and enter your
results.
As usual, the Fedora QA team will hangout at #fedora-test-day(a)libera.chat
for questions and discussion.
[0] http://fedoraproject.org/wiki/Test_Day:2023-09-10_Kernel_6.5_Test_Week
[1] https://testdays.fedoraproject.org/events/166
--
//sumantro
Fedora QE
TRIED AND PERSONALLY TESTED, ERGO TRUSTED
From: Don Zickus on gitlab.com
Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2709
NOTE: Truncated patchset since committer email 'mhofmann(a)redhat.com'
does not match the submitter's GitLab public email address
'dzickus(a)redhat.com'.
There is no easy way to test or debug scheduled job .gitlab-ci.yml
changes. Add infrastructure to allow pushes to a test-os-build area and
a scheduled job to play that branch.
Signed-off-by: Don Zickus <dzickus(a)redhat.com>
---
.gitlab-ci.yml | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
From: Don Zickus <dzickus(a)redhat.com>
Fix the fixup of Fedora release
My previous attempt at this fix appeared to show testing worked. Upon
closer inspection, GITLAB_URL needs to be a highlevel domain and not
project specific otherwise you get a 403 return code.
Just rename the variable to not be GITLAB_URL and all is well again.
Signed-off-by: Don Zickus <dzickus(a)redhat.com>
diff --git a/redhat/scripts/ci/ark-ci-env.sh b/redhat/scripts/ci/ark-ci-env.sh
index blahblah..blahblah 100644
--- a/redhat/scripts/ci/ark-ci-env.sh
+++ b/redhat/scripts/ci/ark-ci-env.sh
@@ -9,7 +9,7 @@ die()
ci_pre_check()
{
if test -n "${TO_PUSH}"; then
- if test -z "${GITLAB_URL}" || test -z "$GITLAB_PUSHURL"; then
+ if test -z "${GITLAB_PROJECT_URL}" || test -z "$GITLAB_PROJECT_PUSHURL"; then
echo "To enable git-push, please run:"
echo "git remote add gitlab <url>"
echo "git remote set-url --push gitlab <pushurl>"
@@ -24,8 +24,8 @@ UPSTREAM_REF=${1:-"master"}
BRANCH=${2:-"os-build"}
PROJECT_ID=${PROJECT_ID:-"13604247"}
TO_PUSH=${DIST_PUSH:-""}
-GITLAB_URL="$(git remote get-url gitlab 2>/dev/null)"
-GITLAB_PUSHURL="$(git config --get remote.gitlab.pushurl 2>/dev/null)"
+GITLAB_PROJECT_URL="$(git remote get-url gitlab 2>/dev/null)"
+GITLAB_PROJECT_PUSHURL="$(git config --get remote.gitlab.pushurl 2>/dev/null)"
ci_pre_check
@@ -33,5 +33,5 @@ export UPSTREAM_REF
export BRANCH
export PROJECT_ID
export TO_PUSH
-export GITLAB_URL
-export GITLAB_PUSHURL
+export GITLAB_PROJECT_URL
+export GITLAB_PROJECT_PUSHURL
diff --git a/redhat/scripts/ci/ark-update-configs.sh b/redhat/scripts/ci/ark-update-configs.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/ci/ark-update-configs.sh
+++ b/redhat/scripts/ci/ark-update-configs.sh
@@ -81,7 +81,7 @@ else
fi
echo
-PUSH_STR="branch ${BRANCH} to ${GITLAB_URL}"
+PUSH_STR="branch ${BRANCH} to ${GITLAB_PROJECT_URL}"
PUSH_CMD="git push gitlab ${BRANCH}"
PUSH_CONFIG_STR="config update branches"
PUSH_CONFIG_CMD="for branch in \$(git branch | grep configs/\"\$(date +%F)\"); do
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2712
Hi, we tested your kernel and here are the results:
Overall result: PASSED
Merge: OK
Compile: OK
Test: OK
Tested-by: CKI Project <cki-project(a)redhat.com>
Kernel information:
Brew / Koji Task ID: 105840869
You can find all the details about the test run at
https://datawarehouse.cki-project.org/kcidb/checkouts/103319
One or more kernel tests failed:
We also see the following known issues which are not related to your changes:
Issue: NFS Connectathon: SELinux prevents rpcbind
URL: https://bugzilla.redhat.com/1758147
Affected tests:
x86_64 - Filesystem - NFS Connectathon
If you find a failure unrelated to your changes, please ask the test maintainer to review it.
This will prevent the failures from being incorrectly reported in the future.
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
From: Don Zickus <dzickus(a)redhat.com>
Fix Fedora release scheduled job
Current scheduled job for release Fedora kernels passes but skips over
including labeled MRs with 'Include in Releases' because of
No connection adapters were found for 'git@gitlab.com:cki-project/kernel-ark.git/api/v4/user'
When cleaning up the ci scripts, commit 376f5f93f3619b added a
ark-ci-env.sh to source for ark-create-release.sh. This script added
some generic functions and exports for other ci scripts to use.
One of the added exports was GITLAB_URL which is used by the python
gitlab cli to control the destination of the remote request. That url
was git@gitlab.com:cki-project/kernel-ark.git, which doesn't have a
acceptable connector for python-requests like 'https://'.
GITLAB_URL is more for verifying the right infrastructure is defined.
So tweak the scripts to set https:// for GITLAB_URL and use the ssh
method for GITLAB_PUSHURL. Then update the checks to verify they exist
before running the script.
Signed-off-by: Don Zickus <dzickus(a)redhat.com>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index blahblah..blahblah 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -243,7 +243,8 @@ eln_64k_debug_baseline:
- chmod 700 ~/.ssh
- echo "$GITLAB_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- - git remote add gitlab git@gitlab.com:cki-project/kernel-ark.git
+ - git remote add gitlab https://gitlab.com/cki-project/kernel-ark.git
+ - git remote set-url --push gitlab git@gitlab.com:cki-project/kernel-ark.git
- gpg2 --import "$TORVALDS_GPG_KEY"
- git checkout --track origin/master && git describe
- git checkout --track origin/os-build && git describe
diff --git a/redhat/scripts/ci/ark-ci-env.sh b/redhat/scripts/ci/ark-ci-env.sh
index blahblah..blahblah 100644
--- a/redhat/scripts/ci/ark-ci-env.sh
+++ b/redhat/scripts/ci/ark-ci-env.sh
@@ -8,8 +8,13 @@ die()
ci_pre_check()
{
- if test -n "${TO_PUSH}" && test -z "${GITLAB_URL}"; then
- die "Please run 'git remote add gitlab <url>' to enable git-push."
+ if test -n "${TO_PUSH}"; then
+ if test -z "${GITLAB_URL}" || test -z "$GITLAB_PUSHURL"; then
+ echo "To enable git-push, please run:"
+ echo "git remote add gitlab <url>"
+ echo "git remote set-url --push gitlab <pushurl>"
+ die "Misconfigured 'gitlab' entry for git"
+ fi
fi
git diff-index --quiet HEAD || die "Dirty tree, please clean before merging."
}
@@ -20,6 +25,7 @@ BRANCH=${2:-"os-build"}
PROJECT_ID=${PROJECT_ID:-"13604247"}
TO_PUSH=${DIST_PUSH:-""}
GITLAB_URL="$(git remote get-url gitlab 2>/dev/null)"
+GITLAB_PUSHURL="$(git config --get remote.gitlab.pushurl 2>/dev/null)"
ci_pre_check
@@ -28,3 +34,4 @@ export BRANCH
export PROJECT_ID
export TO_PUSH
export GITLAB_URL
+export GITLAB_PUSHURL
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2708