Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp270219rwe; Fri, 14 Apr 2023 02:29:16 -0700 (PDT) X-Google-Smtp-Source: AKy350ayShpxnkVrfX4ZW7NAYKY0oAodhKmnnpgZvXto80ImFsKNgGpHPm0a85BIZP0xyAd4RZKk X-Received: by 2002:a05:6a20:7f99:b0:eb:88d9:120d with SMTP id d25-20020a056a207f9900b000eb88d9120dmr1868829pzj.6.1681464556013; Fri, 14 Apr 2023 02:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681464555; cv=none; d=google.com; s=arc-20160816; b=0bNnVzsuquIBMjPr7yLGX/XiOqUhvCYzF8L8teeuuIu9T3h/HAZv+MubU9HZQ3oCX/ 8MkAjHkL6aj3CQONpJ4GKLHvoxrwVH6zArN+x/ybN0kW5t5gCuZhu2xaESMC6ky72eOM wUSNBBa385+eIo6T8cfMu1eoNh3qFgNR3CooDAdFxQ42f7C63YAN27NeZYCqchXLszLB rXN0xRYNVMDxTQAkr0Nft0vF+JtjGa5zkued+2dWCx13kj6JgFoVNTZczzfR57sWACyt 1WegqZNVyPsst/+IDZOaUiyxzH0+KiYsZY1OUhh+ojH0gCS5heYM2XM+8Fhk06a7WYwT Tvmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Full6Lu3LJTMZSG4BhxWOXpmdCCCiHv97wn5GviMUOc=; b=DWkIGAAHg+t/2OH9C/S8ME07pyzShVlQk1nP/QGzvUu3RHFkaRwigPY07HdS4hF8Yd 0xGrUMqFSyg6DCUf6XEdMyC6Pm+CcKfW/ygSD4mqC5GyAau5B5s3ileHlQTOUDvIIlVL B+fPJI5vBOM2dC1+wnFd6bbzAcFG+WfMhZ8L3M20HWB3l9m3JcUMAZRHDIjwOmIEIyT5 JJh+o3tt3gUfMDIyOVTNVK74/qGZXUQo7EYz1kEAJcjozZilsa15DETbWJCG6D0BWwG7 Gy+cX7bBRJQl6S4Ta01ssy4I/0pnu8F7ah2diBc6kwPzFI6Bqt/Er6D45I3FJC+EBrwX CuxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HrHMRY4j; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a170902ec9000b001a64dd9f38dsi4412837plg.633.2023.04.14.02.29.00; Fri, 14 Apr 2023 02:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HrHMRY4j; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229546AbjDNJW6 (ORCPT + 99 others); Fri, 14 Apr 2023 05:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjDNJW6 (ORCPT ); Fri, 14 Apr 2023 05:22:58 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FB8259FF; Fri, 14 Apr 2023 02:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681464177; x=1713000177; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ebf6LIMNhryNaqylHZcAfkVO+1R1IJ4F5ZzDNTo8xYQ=; b=HrHMRY4j9e1cKrQNxS66sFiWyIVFyuMTmr4u/MZtJmUd89uUBfkRmhv7 V6JbU+Ze709gQlxLY8mhz0ZVzF1Viig4DxdN4ejBT9nEXx0deAkhK7dpj EDxiVLMQhFexKS/czkpIL0rp9b6Lp3ImGjbRP6RSygknWwcEPj7hidSKs GDs2gyQxJUNy7NuwiLie642Pvo6gHyYnUhyhVvVSUOKuKNFZ1SrZaVxRY 5/ybwUuPUYSmJrbzC25GoLeNuMhJzNzao6/dBJZdJODxECXw6KwCbd9Og bR37GMPswdryEfNqj4G8swZvoiw1qGetQVkWgf8afbZDMYohsxT8cpsaZ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="346255518" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="346255518" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 02:22:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="935944807" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="935944807" Received: from aslawinx-mobl.ger.corp.intel.com (HELO [10.99.16.144]) ([10.99.16.144]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 02:22:53 -0700 Message-ID: <8978fc5c-73fc-c654-dce2-d3b22511da64@linux.intel.com> Date: Fri, 14 Apr 2023 11:22:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] firmware_loader: rework crypto dependencies Content-Language: en-US To: Arnd Bergmann , Luis Chamberlain , Russ Weight Cc: linux-crypto@vger.kernel.org, Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Tianfei zhang , Cezary Rojewski , Takashi Iwai , linux-kernel@vger.kernel.org References: <20230414080329.76176-1-arnd@kernel.org> From: =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= In-Reply-To: <20230414080329.76176-1-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 4/14/2023 10:03 AM, Arnd Bergmann wrote: > From: Arnd Bergmann > > The crypto dependencies for the firmwware loader are incomplete, > in particular a built-in FW_LOADER fails to link against a modular > crypto hash driver: > > ld.lld: error: undefined symbol: crypto_alloc_shash > ld.lld: error: undefined symbol: crypto_shash_digest > ld.lld: error: undefined symbol: crypto_destroy_tfm >>>> referenced by main.c >>>> drivers/base/firmware_loader/main.o:(fw_log_firmware_info) in archive vmlinux.a > > Rework this to use the usual 'select' from the driver module, > to respect the built-in vs module dependencies, and add a > more verbose crypto dependency to the debug option to prevent > configurations that lead to a link failure. > > Fixes: 02fe26f25325 ("firmware_loader: Add debug message with checksum for FW file") > Signed-off-by: Arnd Bergmann > --- > Tested on a few hundred randconfig builds > --- When I thought I've tested all combinations... ;) Thanks! Reviewed-by: Amadeusz Sławiński