From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10267C433EF for ; Mon, 27 Sep 2021 16:12:56 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 521A460F24 for ; Mon, 27 Sep 2021 16:12:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 521A460F24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 634C182EA5; Mon, 27 Sep 2021 18:12:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iYXphLrY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E4CE382A15; Mon, 27 Sep 2021 18:12:27 +0200 (CEST) Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D27D81761 for ; Mon, 27 Sep 2021 18:12:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-oi1-x22d.google.com with SMTP id v10so26155906oic.12 for ; Mon, 27 Sep 2021 09:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KX4E4WCzdgcUgSykCbX6uR6SE0thCpWh3CxzwhY0IXk=; b=iYXphLrY1B2KUR3HKdeBmVhkgonYTOvbnpxI9fdPr+D/Wy2+iR6Hl3IXHWiAbbwNCU TTRw62FRtN5+hxib74lQRXW4Ve63MjCf0qu+QK9BEx9IGIWCZAfXYT5gVKCjf7jVh3rj +EWi5NXs2DI9JzFPSmCeBLkyE3R4+rrIfNgjxlPmaP+M1Jdapzh3qBA/WQ3IaobuT5bD FEnOFLa24DzVCTCROpzYFQjw0bqp//nkRqcm4Ucxgav/OFI+wOUOPmY/OOtTcOz1DLgI Qh/5tsOPhH5S7dQNChTVVSS5ESPV6CldaSAq8TCU5swWdtyhfKvjGcs2ir7oE0KxtamQ jYuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KX4E4WCzdgcUgSykCbX6uR6SE0thCpWh3CxzwhY0IXk=; b=U6mEOZt0zzkGAza+tmkenCX+bMXa29Zp5rA7S1inWbdBP1AD4RqoyWoL+QTdJ6F1T5 jXokRBxuUA1VDTpsHbPKX6G6l5y17GxB8obNJrhhQ4+fg6vc8kUcQnZl5pAr/+Fq9V+R YLN0HO4L0jHYUd5t5qZWDR7e+I1zwRtC9RPLEWIYAeD/xoVv1dIFp54SK3/fuVh0qmNr k4UWIxloCkblxjkfwtsl7RWx10qH++4JZqR9fh2oSlbrG2JK5W0p0bjpJ2UbS9160tzS 1n/Xf6vvtCGaIxKe94hAtQ1SQBuRaZGoigj/U7kDC/ftPIH65AFqhkmBm4RRkdi8kVgW zPUg== X-Gm-Message-State: AOAM530d8UpJVzgMDPL+2lZuoysnIRisutJlduAjr3+hPTj6Mah8TSdQ BQ4e2/cYcIleLXGS5XW9Ebw= X-Google-Smtp-Source: ABdhPJwcToMvFcy7aNR3/uxK7+spuDtkoAHRFYy+Ay8qtRwyUZ9UDW7G6wBE1nJE7CWsyPgWX7Nq8A== X-Received: by 2002:aca:7c5:: with SMTP id 188mr598810oih.60.1632759142514; Mon, 27 Sep 2021 09:12:22 -0700 (PDT) Received: from nuclearis3.gtech (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id h12sm4215966oof.7.2021.09.27.09.12.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 09:12:22 -0700 (PDT) Subject: Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL To: Simon Glass Cc: U-Boot Mailing List , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Tom Rini , Joe Hershberger References: <20210926014342.127913-1-sjg@chromium.org> <20210925194327.v5.5.Idf4bfa823b4e1a5b357e141a8496acece5051102@changeid> From: "Alex G." Message-ID: <477301f1-3624-a362-8b0c-1cd1ea659029@gmail.com> Date: Mon, 27 Sep 2021 11:12:21 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 9/27/21 11:06 AM, Simon Glass wrote: > Hi Alex, > > On Mon, 27 Sept 2021 at 09:53, Alex G. wrote: >> >> Hi Simon >> >> On 9/25/21 8:43 PM, Simon Glass wrote: >>> At present when building host tools, we force CONFIG_SHAxxx to be enabled >>> regardless of the board Kconfig setting. This is done in the image.h >>> header file. >>> >>> For SPL we currently just assume the algorithm is desired if U-Boot proper >>> enables it. >>> >>> Clean this up by adding new Kconfig options to enable hashing on the host, >>> relying on CONFIG_IS_ENABLED() to deal with the different builds. >>> >>> Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the >>> current settings. >>> >>> This allows us to drop the image.h code and the I_WANT_MD5 hack. >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> Changes in v5: >>> - Drop I_WANT_MD5 >>> - Use TOOLS_ instead of HOST_ >>> >> I was planning to move hash algos to a linker list for target code, and >> a simple, ifdef-free list for the host, like we've done for crypto >> algos, and I think padding algos. >> >> We'd be able to drop #define I_WANT_MD5 (which is temporary), and drop >> define CONFIG_SHA_*, and by extension, drop the need for >> CONFIG_TOOLS_SHA*. I think that's far more elegant. > > OK but can we do that after my series goes in? The series is a > significant #ifdef clean-up and I think you can easily do that on top > of the series. Of course! Alex