From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755162AbZD2BWF (ORCPT ); Tue, 28 Apr 2009 21:22:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755579AbZD2BVx (ORCPT ); Tue, 28 Apr 2009 21:21:53 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35554 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754855AbZD2BVw (ORCPT ); Tue, 28 Apr 2009 21:21:52 -0400 From: Jarod Wilson Organization: Red Hat, Inc. To: linux-crypto@vger.kernel.org Subject: [PATCH] crypto: print self-test pass notices in fips mode Date: Tue, 28 Apr 2009 21:21:35 -0400 User-Agent: KMail/1.11.2 (Linux/2.6.27.21-170.2.56.fc10.x86_64; KDE/4.2.2; x86_64; ; ) Cc: linux-kernel@vger.kernel.org, Herbert Xu , Neil Horman MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904282121.35300.jarod@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to our FIPS CAVS testing lab guru, when we're in fips mode, we *must* print out notices of successful self-test completion for every alg to be compliant. Dependent on patch 'crypto: catch base cipher self-test failures in fips mode', which adds the test_done label. Signed-off-by: Jarod Wilson --- crypto/testmgr.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 39ffa69..d0cc85c 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -2149,6 +2149,10 @@ notest: test_done: if (fips_enabled && rc) panic("%s: %s alg self test failed in fips mode!\n", driver, alg); + /* fips mode requires we print out self-test success notices */ + if (fips_enabled && !rc && strncmp(alg, "ctr(aes", 7)) + printk(KERN_INFO "alg: self-tests for %s (%s) passed\n", + driver, alg); return rc; } EXPORT_SYMBOL_GPL(alg_test); -- Jarod Wilson jarod@redhat.com