Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C3EFC433F5 for ; Sat, 4 Sep 2021 16:49:09 +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 41F4A6056C for ; Sat, 4 Sep 2021 16:49:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 41F4A6056C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 EAA958318E; Sat, 4 Sep 2021 18:49:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1630774146; bh=haytoPZs/3WqaIZDHNKsKGibVtkDVZPHA+cebH862rc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=yFGJQScSrujAnvYi6rT86GnmcdNfNf/brfaUkB12aVVA1oV0rH5MyktfZSJoh8fQb BQLWQKM4tJ+YFUSdUoekHjAhlsOzzRz3em4wPV+LO5dT/7uoUtwXqAF6CqDTz87hln Sb8kHoboP1N6bhOMkEom7j2p6eVhANtirRxtBTsJqSXx4TDtYRUA7POKNMj0SJ2zxK bturwxA7sbt4Dymr/HpQ7x5lB/zQHqPL8SmGWVTP3lgDkkWXfKyf/Sb5BSeyHXRzrT cuniStla8Q7D/RHgzcTiPer6fgHgSW63YdmAvQ72H1qOiK+XvZfQy0Zh42FgQGEUqT Zmq0uwXS8J1mQ== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 8673583131; Sat, 4 Sep 2021 18:49:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1630774143; bh=haytoPZs/3WqaIZDHNKsKGibVtkDVZPHA+cebH862rc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lzqcSsO/dDEsE/oiD1JNU8ZjBNQOO3FESycCedifgzOUoULxJzbVuhu5lwHMhw6Be 2fwk52nDQ2nbVGurUm6V3HmoN+7OC8+zJvPulHrhE+VXgMbLXVw4Q1cg8lJOibo+WP aKIQR2w/o9SMxtK/S/37nO9aiEQM3t4/2FANXAQFvKR/Tx+fYxR4J8KYEbUJskIa0f vSCv00Gqu8oFjhTAax5d8NkSR2E/tRttY7Z8U9FfoQOtsDB/aMgsIcPElaXea61+f+ Tno30ZuawBvraatV7dEaV3V7quda8rl1GjcA5IL202whrgsMxR0Myfv7EBHEPj11v6 IW7bd4nstjHyQ== Subject: Re: [PATCH 02/14] lmb: Use CONFIG_LMB_*_REGIONS only if they are defined To: Tom Rini Cc: u-boot@lists.denx.de, Simon Glass , Simon Goldschmidt References: <20210829225126.GM858@bill-the-cat> <20210829231145.GN858@bill-the-cat> <95c965a3-2da8-1212-fb54-0d5628d7743b@denx.de> <20210830120102.GO858@bill-the-cat> <678a77d9-356a-e924-da8e-102fba938ee3@denx.de> <20210904141019.GC12964@bill-the-cat> <72c92d4d-f064-f7f3-dd4b-57cf994009db@denx.de> <20210904151714.GE12964@bill-the-cat> <20210904160901.GF12964@bill-the-cat> From: Marek Vasut Message-ID: <2de2fee5-dcba-fc40-471e-3f4e1f1147bb@denx.de> Date: Sat, 4 Sep 2021 18:49:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210904160901.GF12964@bill-the-cat> Content-Type: text/plain; charset=windows-1252; 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/4/21 6:09 PM, Tom Rini wrote: > On Sat, Sep 04, 2021 at 06:05:50PM +0200, Marek Vasut wrote: >> On 9/4/21 5:17 PM, Tom Rini wrote: >>> On Sat, Sep 04, 2021 at 05:15:45PM +0200, Marek Vasut wrote: >>>> On 9/4/21 4:10 PM, Tom Rini wrote: >>>> [...] >>>> >>>>>>>>> At this point, I think you should rework things to stop making >>>>>>>>> CONFIG_LMB be optional, it should be a def_bool y. >>>>>>>> >>>>>>>> I disagree, see above. >>>>>>> >>>>>>> The only reason "tools-only_defconfig" builds a useless u-boot binary >>>>>>> today is in CI where it would be more work than it's worth to make CI >>>>>>> exclude that from the build list. But if you want to just do that >>>>>>> instead, I'll also accept adding -x tools-only to the azure/gitlab jobs >>>>>>> that build all other architectures, as tools-only is tested in its own >>>>>>> build job, for it's only valid build target. >>>>>> >>>>>> The tools-only build is also used elsewhere, to build just that, tools. >>>>> >>>>> I've repeatedly explained myself and what I'm looking for in v2 of this >>>>> series. I will summarize one last time. The "tools-only_defconfig" is >>>>> for tools, only. Building anything other than the "tools-only" target >>>>> isn't useful. In U-Boot itself, LMB is required as that is how we >>>>> prevent a number of CVEs from being trivial to exploit. v2 of this >>>>> series needs to drop patches 1 and 2 of v1 of this series. It can >>>>> further do any of: >>>>> 1. Nothing else. >>>>> 2. Add tools-only to the exclude list in the "build everything else" CI >>>>> job. >>>>> 3. Make CONFIG_LMB be def_bool y. >>>> >>>> If tools-only is for tools, only, then why should it enable LMB ? >>>> The tools are userspace tools, they do not need LMB, and so LMB can be >>>> disabled. >>>> >>>> This is the part which is unclear to me. >>> >>> I don't know why it's unclear to you at this point, sorry. >> >> Well why exactly does a userspace program require LMB enabled ? >> What does LMB protect in there ? obviously not U-Boot. > > I feel like you've lost the thread. Can you please answer my questions above ? This is exactly what patch 1/14 is about -- disable LMB for tools build, because it is useless for tools build.