lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <65a92232.5d0a0220.44e3f.f721@mx.google.com>
Date: Thu, 18 Jan 2024 14:05:53 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
	Russell King <linux@...linux.org.uk>,
	Andy Gross <agross@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konrad.dybcio@...ainline.org>,
	Arnd Bergmann <arnd@...db.de>, Ard Biesheuvel <ardb@...nel.org>,
	"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
	Nick Hawkins <nick.hawkins@....com>,
	John Crispin <john@...ozen.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] ARM: mach-qcom: fix support for ipq806x

On Thu, Jan 18, 2024 at 10:02:37AM +0100, Linus Walleij wrote:
> On Thu, Jan 18, 2024 at 12:04 AM Christian Marangi <ansuelsmth@...il.com> wrote:
> 
> > Some followup on this... I manage to enable DEBUG_LL and can have debug
> > output from the decompressor...
> 
> Yeah that is helpful!
> 
> > From what I can see fdt_check_mem_start is not called at all...
> >
> > What I'm using with kernel config are:
> > CONFIG_ARM_APPENDED_DTB=y
> > CONFIG_ARM_ATAG_DTB_COMPAT=y
> > And a downstream patch that mangle all the atags and takes only the
> > cmdline one.
> >
> > The load and entry point is:
> > 0x42208000
> >
> > With the current setup I have this (I also added some debug log that
> > print what is actually passed to do decompress
> >
> > DTB:0x42AED270 (0x00008BA7)
> > Uncompressing Linux...
> > 40208000
> > 4220F10C done, booting the kernel.
> >
> > Where 40208000 is the value of output_start and 4220F10C is input_data.
> >
> > And I think this confirm that it's getting loaded in the wrong position
> > actually in reserved memory... But how this is possible??? Hope can
> > someone help me in this since I wasted the entire day with this and
> > didn't manage to make any progress... aside from having fun with the
> > head.S assembly code.
> 
> I have no idea how this happens, but when I boot images I do
> it using fastboot like this:
> 
> fastboot --base 40200000 --cmdline "console=ttyMSM0,115200,n8" boot zImage
> 
> So I definitely hammer it to boot from 0x40200000 (+0x8000).
>

Consider that this is uboot so nothing about fastboot.

Without AUTO_ZRELADDR enabled this is the output from the decompressor.

Starting kernel ...

DTB:0x42B214A0 (0x00008B79)
C:0x422080C0-0x42B2A040->0x4349C600-0x43DBE580
DTB:0x43DB59E0 (0x00008B85)
Uncompressing Linux...
42208000 
434A362C done, booting the kernel.

42208000 input 434A362C output

The DTB location match but I can see the ADDR to the right place and
getting moved to a new location (I assume as it would get overwritten by
itself...)

guess the main problem is

mov	r0, pc (line 279)

With pc veing 0x40200000 instead of 0x42200000

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ