public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 02/14] lmb: Use CONFIG_LMB_*_REGIONS only if they are defined
Date: Sat, 4 Sep 2021 15:56:43 -0400	[thread overview]
Message-ID: <20210904195643.GK12964@bill-the-cat> (raw)
In-Reply-To: <e198d05d-98f3-290e-d65b-e5e02cdb24e6@denx.de>

[-- Attachment #1: Type: text/plain, Size: 4071 bytes --]

On Sat, Sep 04, 2021 at 09:37:39PM +0200, Marek Vasut wrote:
> On 9/4/21 7:01 PM, Tom Rini wrote:
> > [trimming the CC list]
> > 
> > On Sat, Sep 04, 2021 at 06:49:03PM +0200, Marek Vasut wrote:
> > > 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 ?
> > 
> > I have.
> 
> This attitude is not helpful. Please answer my questions, if necessary
> please reiterate, otherwise this discussion cannot be resolved and will only
> lead to frustration.

One last time then.  The only reason tools-only_defconfig is ever built
for a target other than "tools-only" is because CI does not exclude it
from the world build stage.  You can fix this by doing option #2 still
quoted above.

The only CONFIG options that are at all valid for "tools-only" and so
the host tools related, are LOCALVERSION (which is why there's a
tools-only defconfig at all) and now TOOLS_LIBCRYPTO.  Nothing else at
all should matter as the tools should always be the same.  So your point
about "what does userspace need LMB for" is irrelevant.  The host tools
should need NO option be enabled/disabled.

Further, "disabling FOO breaks the build" means we need to investigate
what the correct resolution is.  In this case, LMB needs to be def_bool
y.  This is option #3 above.  Why does u-boot-as-sandbox need LMB?
Because that's how we ensure that the tests that check for overlap fail
as expected.

Finally, you can just drop the first two patches and call me too
stubborn.  This is option #1 above.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2021-09-04 19:56 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 18:13 [PATCH 01/14] configs: Disable LMB and BDI for tools-only Marek Vasut
2021-08-15 18:13 ` [PATCH 02/14] lmb: Use CONFIG_LMB_*_REGIONS only if they are defined Marek Vasut
2021-08-15 19:47   ` Tom Rini
2021-08-29 16:26     ` Marek Vasut
2021-08-29 18:02       ` Tom Rini
2021-08-29 19:24         ` Marek Vasut
2021-08-29 19:32           ` Tom Rini
2021-08-29 21:47             ` Marek Vasut
2021-08-29 22:10               ` Tom Rini
2021-08-29 22:19                 ` Marek Vasut
2021-08-29 22:23                   ` Tom Rini
2021-08-29 22:40                     ` Marek Vasut
2021-08-29 22:51                       ` Tom Rini
2021-08-29 23:00                         ` Marek Vasut
2021-08-29 23:11                           ` Tom Rini
2021-08-30  9:45                             ` Marek Vasut
2021-08-30 12:01                               ` Tom Rini
2021-09-04 14:03                                 ` Marek Vasut
2021-09-04 14:10                                   ` Tom Rini
2021-09-04 15:15                                     ` Marek Vasut
2021-09-04 15:17                                       ` Tom Rini
2021-09-04 16:05                                         ` Marek Vasut
2021-09-04 16:09                                           ` Tom Rini
2021-09-04 16:49                                             ` Marek Vasut
2021-09-04 17:01                                               ` Tom Rini
2021-09-04 19:37                                                 ` Marek Vasut
2021-09-04 19:56                                                   ` Tom Rini [this message]
2021-08-15 18:13 ` [PATCH 03/14] lmb: Always compile arch_lmb_reserve() into U-Boot on arm Marek Vasut
2021-08-15 19:47   ` Tom Rini
2021-08-15 18:13 ` [PATCH 04/14] lmb: Always compile arch_lmb_reserve() into U-Boot on arc Marek Vasut
2021-08-15 18:13 ` [PATCH 05/14] lmb: Add generic arch_lmb_reserve_generic() Marek Vasut
2021-08-15 19:49   ` Tom Rini
2021-08-15 18:13 ` [PATCH 06/14] lmb: Switch to " Marek Vasut
2021-08-15 19:48   ` Tom Rini
2021-08-15 18:13 ` [PATCH 07/14] lmb: nios2: Add arch_lmb_reserve() Marek Vasut
2021-08-15 18:13 ` [PATCH 08/14] lmb: nds32: " Marek Vasut
     [not found]   ` <HK0PR03MB2994783DDC460B69CDE74093C1CE9@HK0PR03MB2994.apcprd03.prod.outlook.com>
2021-09-02  1:53     ` Rick Chen
2021-08-15 18:13 ` [PATCH 09/14] lmb: riscv: " Marek Vasut
     [not found]   ` <HK0PR03MB2994629C8CC69189EDF64C00C1CE9@HK0PR03MB2994.apcprd03.prod.outlook.com>
2021-09-02  1:54     ` Rick Chen
2021-08-15 18:13 ` [PATCH 10/14] lmb: sh: " Marek Vasut
2021-08-15 18:13 ` [PATCH 11/14] lmb: xtensa: " Marek Vasut
2021-08-15 18:13 ` [PATCH 12/14] lmb: x86: " Marek Vasut
2021-08-15 18:13 ` [PATCH 13/14] lmb: Mark arch_lmb_reserve() as weak symbol Marek Vasut
2021-08-15 19:50   ` Tom Rini
2021-08-29 16:46     ` Marek Vasut
2021-08-29 18:01       ` Tom Rini
2021-08-15 18:13 ` [PATCH 14/14] lmb: Switch imx board_lmb_reserve() to arch_lmb_reserve() Marek Vasut
2021-08-15 19:47   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210904195643.GK12964@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox