Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2023.10 is OUT / Merge Window is OPEN, next branch is CLOSED / Release v2024.01 is scheduled for 08 January 2024 / Channel archives at https://libera.irclog.whitequark.org/u-boot
<dsimic> it's good to know how something became what it currently is, IMHO
<dsimic> that also makes someone appreciate it all much better
<marex> dsimic: I recently looked at some 2012.xx release of U-Boot, it was barely DM and no Kconfig, it was ... painful
<marex> dsimic: also reinforces ones' belief that cooperating with upstream is a good thing, compared to doing downstream modifications
<ukky> sjg1: thanks for patching mbr test
<dsimic> marex: it's always a good thing to upstream
hanetzer has quit [Ping timeout: 272 seconds]
prabhakarlad has quit [Ping timeout: 245 seconds]
zibolo has quit [Ping timeout: 255 seconds]
zibolo has joined #u-boot
hanetzer has joined #u-boot
apritzel_ has quit [Ping timeout: 245 seconds]
mmu_man has quit [Ping timeout: 255 seconds]
jclsn has quit [Ping timeout: 260 seconds]
jclsn has joined #u-boot
<marex> dsimic: so very true
vagrantc has joined #u-boot
sakman has joined #u-boot
Mis012 has quit [Remote host closed the connection]
Mis012 has joined #u-boot
Leopold has quit [Ping timeout: 248 seconds]
Leopold has joined #u-boot
hanetzer has quit [Ping timeout: 260 seconds]
hanetzer has joined #u-boot
hanetzer has quit [Ping timeout: 255 seconds]
hanetzer has joined #u-boot
persmule has quit [Quit: Leaving]
gsz has joined #u-boot
persmule has joined #u-boot
persmule has quit [Quit: Leaving]
persmule has joined #u-boot
persmule has quit [Remote host closed the connection]
persmule has joined #u-boot
monstr has joined #u-boot
camus has quit [Quit: camus]
camus has joined #u-boot
ezulian_ has joined #u-boot
apritzel_ has joined #u-boot
monstr has quit [Ping timeout: 245 seconds]
Hypfer2 has joined #u-boot
Hypfer has quit [Ping timeout: 255 seconds]
Hypfer2 is now known as Hypfer
vagrantc has quit [Quit: leaving]
Hypfer has quit [Client Quit]
Hypfer has joined #u-boot
apritzel_ has quit [Ping timeout: 255 seconds]
tnovotny has joined #u-boot
mckoan|away is now known as mckoan
ezulian_ has quit [Quit: ezulian_]
goliath has joined #u-boot
gsz has quit [Quit: leaving]
frieder has joined #u-boot
stefanro has joined #u-boot
ezulian has joined #u-boot
monstr has joined #u-boot
naoki has quit [Quit: naoki]
mrnuke has quit [Ping timeout: 240 seconds]
mrnuke has joined #u-boot
apteryx has quit [Ping timeout: 255 seconds]
ldevulder has quit [Quit: Leaving]
apteryx has joined #u-boot
sszy has joined #u-boot
prabhakarlad has joined #u-boot
camus has quit [Read error: Connection reset by peer]
camus1 has joined #u-boot
camus1 is now known as camus
ldevulder has joined #u-boot
mmu_man has joined #u-boot
dsimic has quit [Ping timeout: 258 seconds]
dsimic has joined #u-boot
matthias_bgg has quit [Ping timeout: 258 seconds]
Net147 has quit [Quit: Quit]
matthias_bgg has joined #u-boot
deathmist has quit [Ping timeout: 240 seconds]
deathmist has joined #u-boot
sng_ has joined #u-boot
sng has quit [Read error: Connection reset by peer]
GNUtoo has quit [Ping timeout: 252 seconds]
deathmist has quit [Ping timeout: 260 seconds]
GNUtoo has joined #u-boot
deathmist has joined #u-boot
Net147 has joined #u-boot
Net147 has quit [Changing host]
Net147 has joined #u-boot
deathmist has quit [Ping timeout: 240 seconds]
deathmist has joined #u-boot
Net147 has quit [Quit: Quit]
deathmist has quit [Ping timeout: 252 seconds]
deathmist has joined #u-boot
Net147 has joined #u-boot
Net147 has quit [Changing host]
Net147 has joined #u-boot
deathmist has quit [Ping timeout: 246 seconds]
deathmist has joined #u-boot
deathmist has quit [Ping timeout: 252 seconds]
deathmist has joined #u-boot
deathmist has quit [Client Quit]
BobBeck6 has quit [Quit: The Lounge - https://thelounge.chat]
MWelchUK7 has quit [Quit: The Lounge - https://thelounge.chat]
BobBeck6 has joined #u-boot
MWelchUK7 has joined #u-boot
BobBeck6 has quit [Client Quit]
MWelchUK7 has quit [Client Quit]
prabhakarlad has quit [Quit: Client closed]
deathmist has joined #u-boot
apritzel_ has joined #u-boot
matthias_bgg has quit [Ping timeout: 272 seconds]
vfazio has quit [Read error: Connection reset by peer]
vfazio has joined #u-boot
prabhakarlad has joined #u-boot
indy has quit [Ping timeout: 255 seconds]
indy has joined #u-boot
BobBeck6 has joined #u-boot
MWelchUK7 has joined #u-boot
apritzel_ has quit [Ping timeout: 260 seconds]
deathcamel57 has joined #u-boot
goliath has quit [Quit: SIGSEGV]
sng_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
apteryx has left #u-boot [#u-boot]
sng has joined #u-boot
monstr has quit [Remote host closed the connection]
prabhakarlad has quit [Quit: Client closed]
goliath has joined #u-boot
qqq has quit [Quit: leaving]
mmu_man has quit [Ping timeout: 255 seconds]
stefanro has quit [Quit: Leaving.]
GNUtoo has quit [Ping timeout: 252 seconds]
Perflosopher has quit [Read error: Connection reset by peer]
Perflosopher has joined #u-boot
frieder has quit [Remote host closed the connection]
deathcamel57 has quit [Read error: Connection reset by peer]
deathcamel57 has joined #u-boot
mckoan is now known as mckoan|away
vagrantc has joined #u-boot
slobodan has joined #u-boot
goliath has quit [Quit: SIGSEGV]
prabhakarlad has joined #u-boot
___nick___ has joined #u-boot
goliath has joined #u-boot
mmu_man has joined #u-boot
persmule has quit [Ping timeout: 252 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<Tartarus> Forty-Bot: was https://patchwork.ozlabs.org/project/uboot/list/?series=377642 ready to apply, or was there going to be a v3?
___nick___ has joined #u-boot
___nick___ has quit [Client Quit]
___nick___ has joined #u-boot
<pivi> marex: no credit for the CVE? you can make some cash $$$$$ adding it to your CV!
* marex rolls eyes
<marex> pivi: I even have an exploit ;)
<marex> more of a PoC really
<marex> rfs613: some sort of memory corruption ? Start overwrites env area or whatever ?
<marex> rfs613: check your memory layout
<marex> rfs613: see cmd/bdinfo.c for details how that should be printed
<pivi> marex: no doubt about it, is the $$$$ that is missing!
<marex> pivi: hehehe
<pivi> marex: by the way, I was finally able to meat fabio in real life last week in Brazil
<marex> pivi: I think we should start writing our own CVEs though, going through that $company sucked
<marex> pivi: ooooh nice
<marex> pivi: he's a great guy :)
<pivi> marex: I use to say that adding bugs is about job safety, adding bug that turns into CVS is about salary increase when job hopping ;-)
<pivi> s/CVS/CVE/
niska has quit [Quit: Leaving]
<marex> pivi: ha
niska has joined #u-boot
<rfs613> marex: thanks for the reply. So env is the compiled-in one, from which a hash table is built at boot time, using lots of malloc() calls. I suppose it could be somehow writing out of bounds, and corrupting the (relocated) u-boot code, or the stack (more likely).
<marex> rfs613: malloc shouldn't, stack might grow too deep
<marex> rfs613: that would be my guess with obscure behavior like that anyway
___nick___ has quit [Ping timeout: 258 seconds]
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<rfs613> frankly I was surprised how many times malloc happens, eg. to compile a regex for matching against each env variable, as it is added to the hashtable.
<rfs613> (see function regex_callback...)
<marex> rfs613: optimization opportunity ? :)
<marex> rfs613: that can be done in sandbox too
<rfs613> yeah that would be a *lot* less painful ;-)
<marex> indeed
<rfs613> marex: just did a quick test with the internal environment minimized (undefined CONFIG_EXTRA_ENV_SETTINGS), and it looks like that works
<rfs613> so you may be on to something with either the stack usage or otherwise memory corruption
<marex> rfs613: check the memory layout
<marex> rfs613: basically run what cmd/bdinfo does before you init env, or even in env_init or whatever it is called
<marex> there is some hook in common/board_f.c and common/board_r.c
<rfs613> marex: hmm so you're saying to look for changes in what bdinfo reports before/after the env_init() ?
<marex> probably look at what bdinfo reports and where exactly is your stack at that point
<rfs613> bdinfo on succesful boot report stack start 8x8fb86a0, which is what i'd expect, machine has 256MB starting at 0x80000000
<rfs613> i guess i'll have to go see what values i'm gettin from those malloc()s during env_init
<marex> malloc area is just below where uboot relocated itself
<marex> is the failure happening early on boot in board_f or later in board_r ?
apritzel_ has joined #u-boot
<rfs613> it's in board_r
<silurian_invader> this will surely increase his street cred in his quest to be known as an 31337 hax0r
* marex rolls eyes :)
<deathcamel57> I'm currently stuck on getting a new kernel booting on an old U-Boot build (2010.06). I'm loading the kernel + DTB, then booting with this command `usb start; fatload usb 0 0x83000000 uImage; fatload usb 0 0x81000000 hi3520dv200-demb.dtb;bootm 0x83000000 - 0x81000000` However, my new kernel can't find the DTB that I've passed in. Is there anything in particular I should start looking into?
<marex> hanetzer: wasnt that ^ something you experimented with ?
<marex> deathcamel57: you can always try to build the kernel with built-in DT
<marex> deathcamel57: maybe the ancient uboot version doesn't support passing DT to Linux, or it was configured out
<marex> deathcamel57: does the default boot command do it ?
<marex> deathcamel57: => help bootm
<deathcamel57> I'm not finding much about appending DTBs to a uImage, just zImage (which this build doesn't support).
<deathcamel57> The most useful help string goes to: `bootm - boot application image from memory` lmao
<marex> uImage is usually wrapper around zImage
<marex> use mkimage to wrap zImage into uImage
goliath has quit [Quit: SIGSEGV]
<marex> adjust per your board and esp. memory layout
<deathcamel57> That's giving me the error `Wrong Image Format for bootm command`
<marex> deathcamel57: do you have the old uImage ?
<marex> run mkimage -l olduImage
<marex> see what that prints
<deathcamel57> Do you mean my kernel uImage, or the vendor's?
<marex> btw remember you cannot load the uImage at the same address as either mkimage -a or -e entry point
<marex> the uImage content is first copied to -a address, and then uboot jumps to -e entry point
<marex> deathcamel57: yes, vendor uImage
<deathcamel57> My `mkimage` uses the same -a and -e as vendor's
<marex> and do you load the uImage at any of those addresses ?
<marex> remember, you should not
ldevulder has quit [Quit: Leaving]
<deathcamel57> I'm loading the image to `0x83000000` and doing `bootm 0x83000000` to boot. The data address and entrypoint is `0x80008000`
<marex> should be OK
<marex> deathcamel57: try help bootz
<marex> deathcamel57: is that present ?
<deathcamel57> bootz doesn't exist in this build.
<deathcamel57> bootz didn't exist in 2010.06 at all I don't think.
<deathcamel57> This U-Boot is a teenager now, so it can be temperamental.
<marex> deathcamel57: the vendor uImage can be started that ^ way ?
deathcamel57 has quit [Read error: Connection reset by peer]
deathcamel57_ has joined #u-boot
___nick___ has joined #u-boot
___nick___ has quit [Ping timeout: 255 seconds]
slobodan has quit [Ping timeout: 258 seconds]
vagrantc has quit [Ping timeout: 240 seconds]
<Forty-Bot> Tartarus: I'm going to look at thr growth from the bootp thing first
<Forty-Bot> if it isn't that bad I'll resend as v3
<Tartarus> OK, so there's a few changes anyhow, for a v3?
<Tartarus> I hadn't quite seen
<Forty-Bot> no other changes
<Tartarus> OK, I can just size test it all overnight if you like then and apply or give you some feedback
<Forty-Bot> fine by me
<Tartarus> OK, firing off, I'll have something one way or another in the morning US eastern
Leopold has quit [Ping timeout: 252 seconds]
Leopold has joined #u-boot