test_520_config_random_trust_cpu in ubuntu_qrt_kernel_security failed on B-4.15 /F-5.4 arm64

Bug #1990620 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QA Regression Testing
Fix Released
Undecided
Po-Hsu Lin
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin

Bug Description

Issue found on Focal 5.4.0-128.144 in cycle sru-20220919, with ARM64 only.
(Note that we have bug 1990090 fixed recently, which is asking this option to be set for all architectures with kernel > 4.9)

Test failed with:
 FAIL: test_520_config_random_trust_cpu (__main__.KernelSecurityConfigTest)
 Ensure RANDOM_TRUST_CPU is enabled (LP: #1823754)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "./test-kernel-security.py", line 2981, in test_520_config_random_trust_cpu
     self.assertKernelConfig('RANDOM_TRUST_CPU', expected)
   File "./test-kernel-security.py", line 231, in assertKernelConfig
     self.assertKernelConfigSet(name)
   File "./test-kernel-security.py", line 218, in assertKernelConfigSet
     '%s option was expected to be set in the kernel config' % name)
 AssertionError: RANDOM_TRUST_CPU option was expected to be set in the kernel config

 ----------------------------------------------------------------------
 Ran 1 test in 0.003s

This option was not set to y in annotations from Focal:
CONFIG_RANDOM_TRUST_CPU policy<{'amd64': 'y', 'i386': 'y', 'ppc64el': 'y', 's390x': 'y'}>

We will need to decide if we want to modify this or the test case itself.

Po-Hsu Lin (cypressyew)
description: updated
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I just checked the Jammy config, we have arm64 set to y there.

Here is the feedback from smb regarding Focal kernel:

smb:
> So RANDOM_TRUST_CPU depends on ARCH_RANDOM and that is not defined for arm* for Focal 5.4 at least.
> In jammy there is and was introduced in 5.13 with
> commit 1a50ec0b3b2e9a83f1b1245ea37a853aac2f741c
> Author: Richard Henderson <email address hidden>
> Date: Tue Jan 21 12:58:52 2020 +0000
>
> arm64: Implement archrandom.h for ARMv8.5-RNG
>
> So whatever annotation in older kernels would say, without having above patch there is no TRUST_CPU possible

Conclusion:
At least for kernel < 5.13 and arm not set would be expected.

Po-Hsu Lin (cypressyew)
Changed in qa-regression-testing:
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Also affecting B-4.15

tags: added: 4.15 bionic
tags: added: sru-20221010
summary: test_520_config_random_trust_cpu in ubuntu_qrt_kernel_security failed on
- Focal 5.4 arm64
+ B-4.15 /F-5.4 arm64
Revision history for this message
Steve Beattie (sbeattie) wrote :
Changed in qa-regression-testing:
status: In Progress → Fix Released
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.