From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756498AbcECUfp (ORCPT ); Tue, 3 May 2016 16:35:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36905 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756337AbcECUfn convert rfc822-to-8bit (ORCPT ); Tue, 3 May 2016 16:35:43 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20160503172536.GC20775@cucamonga.audible.transient.net> References: <20160503172536.GC20775@cucamonga.audible.transient.net> <20160430083248.GA20775@cucamonga.audible.transient.net> <26795.1462266613@warthog.procyon.org.uk> To: Jamie Heilman Cc: dhowells@redhat.com, Herbert Xu , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, tadeusz.struk@intel.com Subject: Re: v4.6-rc1 regression bisected, Problem loading in-kernel X.509 certificate (-2) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11322.1462307740.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 03 May 2016 21:35:40 +0100 Message-ID: <11323.1462307740@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (cc'ing Tadeusz as he did the pkcs1 padding function) Jamie Heilman wrote: > > > Problem loading in-kernel X.509 certificate (-2) > > > > ENOENT? Hmmm... The only place that is generated is in the crypto layer. > > That suggests missing crypto of some sort. > > > > The attached patch enables some debugging in some relevant files if you can > > try applying it to your kernel. > > Alrighty, presumably relevant bits: > > X.509: Cert Issuer: Build time autogenerated kernel key > X.509: Cert Subject: Build time autogenerated kernel key > X.509: Cert Key Algo: rsa > X.509: Cert Valid period: 1461826791-4615426791 > X.509: Cert Signature: rsa + sha512 > X.509: ==>x509_check_signature() > X.509: ==>x509_get_sig_params() > X.509: <==x509_get_sig_params() = 0 > PKEY: ==>public_key_verify_signature() > X.509: Cert Verification: -2 Hmmm... Okay, the only ways out of public_key_verify_signature() without printing a leaving message are for snprintf() to overrun (which would return error -22) or for crypto_alloc_akcipher() to have failed; everything else must go through the kleave() at the pr_devel() at the bottom of the function. Can you stick: pr_devel("ALGO: %s\n", alg_name); immediately before this line: tfm = crypto_alloc_akcipher(alg_name, 0, 0); and try it again? Thanks, David