mbox series

[SRU,F:linux-bluefield,0/1] UBUNTU: SAUCE: pka: Test TRNG block before making it available

Message ID 1619111879-3012-1-git-send-email-mahantesh@nvidia.com
Headers show
Series UBUNTU: SAUCE: pka: Test TRNG block before making it available | expand

Message

Mahantesh Salimath April 22, 2021, 5:17 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1925514

SRU Justification:

[Impact]
* TRNG block in PKA HW may not be functioning as expected,
without carrying out tests there is no way to verify its functionality.
These tests are carried out early in the boot stage during ATF (ARM Trusted Firmware),
carry out these tests again while loading PKA linux driver.

[Fix]
* Add tests to verify TRNG "pka: Test TRNG block before making it available"

[Test Case]
* Derive random bytes from TRNG in PKA HW via OpenSSL using 'pka' engine.
Ex:# openssl rand -engine pka 512.

[Regression Potential]
* If the any of the tests fail then TRNG will be disabled.
Hence random bytes cannot be derived from PKA HW.

Comments

Tim Gardner April 22, 2021, 6:08 p.m. UTC | #1
Acked-by: Tim Gardner <tim.gardner@canonical.com>

You guys have to start using scripts/checkpatch.pl if you are ever to 
have a hope of getting your code accepted upstream.

rtg

On 4/22/21 11:17 AM, Mahantesh Salimath wrote:
> BugLink: https://bugs.launchpad.net/bugs/1925514
> 
> SRU Justification:
> 
> [Impact]
> * TRNG block in PKA HW may not be functioning as expected,
> without carrying out tests there is no way to verify its functionality.
> These tests are carried out early in the boot stage during ATF (ARM Trusted Firmware),
> carry out these tests again while loading PKA linux driver.
> 
> [Fix]
> * Add tests to verify TRNG "pka: Test TRNG block before making it available"
> 
> [Test Case]
> * Derive random bytes from TRNG in PKA HW via OpenSSL using 'pka' engine.
> Ex:# openssl rand -engine pka 512.
> 
> [Regression Potential]
> * If the any of the tests fail then TRNG will be disabled.
> Hence random bytes cannot be derived from PKA HW.
>
Krzysztof Kozlowski April 23, 2021, 7:48 a.m. UTC | #2
On 22/04/2021 20:08, Tim Gardner wrote:
> Acked-by: Tim Gardner <tim.gardner@canonical.com>
> 
> You guys have to start using scripts/checkpatch.pl if you are ever to 
> have a hope of getting your code accepted upstream.

Indeed neither this patch nor previous code here matches Linux kernel
coding style, which means it is not upstreamable now.

I believe it should be upstreamed first. The more of such code we take,
the further it will be from Linux... I can offer some guidance and help
if needed.

Best regards,
Krzysztof
Stefan Bader April 23, 2021, 10:33 a.m. UTC | #3
On 22.04.21 19:17, Mahantesh Salimath wrote:
> BugLink: https://bugs.launchpad.net/bugs/1925514
> 
> SRU Justification:
> 
> [Impact]
> * TRNG block in PKA HW may not be functioning as expected,
> without carrying out tests there is no way to verify its functionality.
> These tests are carried out early in the boot stage during ATF (ARM Trusted Firmware),
> carry out these tests again while loading PKA linux driver.
> 
> [Fix]
> * Add tests to verify TRNG "pka: Test TRNG block before making it available"
> 
> [Test Case]
> * Derive random bytes from TRNG in PKA HW via OpenSSL using 'pka' engine.
> Ex:# openssl rand -engine pka 512.
> 
> [Regression Potential]
> * If the any of the tests fail then TRNG will be disabled.
> Hence random bytes cannot be derived from PKA HW.
> 
Applied to focal:linux-bluefield/master-next. Thanks.

-Stefan