Re: Nokia N900 on 5.4 and 5.5

8 messages, 4 authors, 2020-02-13 · open the first message on its own page

Re: Nokia N900 on 5.4 and 5.5

From: Tony Lindgren <tony@atomide.com>
Date: 2020-02-07 16:36:43

Hi,

* H. Nikolaus Schaller [off-list ref] [200207 15:52]:
quoted
Am 07.02.2020 um 15:54 schrieb Merlijn Wajer [off-list ref]:

Hi,

I've tried to build 5.4.18 and 5.5.2 for the Nokia N900, using
omap2plus_defconfig. Using appended DTB, like so:

$ cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > zImage.dtb
$ mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n
zImage -d zImage.dtb uImage

But they both fail to boot for me - the device resets almost instantly:
quoted
data abort

   MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<8000c878>]          lr : [<80008160>]
sp : 803c46c8  ip : 003a1870     fp : 003a1848
r10: 803ba890  r9 : 00caa42c     r8 : 80000100
r7 : 000007a3  r6 : 803a9878     r5 : 80000100  r4 : 80008000
r3 : 00004e6c  r2 : 00019fa8     r1 : 803a9878  r0 : 00000000
Flags: nZcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...
Full log below. I tried the same with "-Os" instead of "-O2" ; to no avail.

Any clue what could be up?
I can only tell that I have successfully running 5.5.2 on GTA04A5 (dm3730
but with our own defconfig). This may reduce the number of problem areas
a little.
Looks like there's a regression in general for appended dtb booting that
was caused by commit 9f671e58159a ("security: Create "kernel hardening"
config area"). With that change we now get STACKPROTECTOR_PER_TASK
selected by default with Kconfig.

Merlijn, care to try to disable STACKPROTECTOR_PER_TASK in your
.config to see if that helps?

Not sure why appended dtb boot now breaks though.. Could be just the
zImage uncompressing over dtb again? Any ideas?

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: Nokia N900 on 5.4 and 5.5

From: Merlijn Wajer <hidden>
Date: 2020-02-07 16:47:25

On 07/02/2020 17:36, Tony Lindgren wrote:
Looks like there's a regression in general for appended dtb booting that
was caused by commit 9f671e58159a ("security: Create "kernel hardening"
config area"). With that change we now get STACKPROTECTOR_PER_TASK
selected by default with Kconfig.

Merlijn, care to try to disable STACKPROTECTOR_PER_TASK in your
.config to see if that helps?
Yes, this makes the kernel boot.

Cheers,
Merlijn

Re: Nokia N900 on 5.4 and 5.5

From: Tony Lindgren <tony@atomide.com>
Date: 2020-02-07 16:54:01

* Merlijn Wajer [off-list ref] [200207 16:47]:
On 07/02/2020 17:36, Tony Lindgren wrote:
quoted
Looks like there's a regression in general for appended dtb booting that
was caused by commit 9f671e58159a ("security: Create "kernel hardening"
config area"). With that change we now get STACKPROTECTOR_PER_TASK
selected by default with Kconfig.

Merlijn, care to try to disable STACKPROTECTOR_PER_TASK in your
.config to see if that helps?
Yes, this makes the kernel boot.
OK good to hear. My guess is that having STACKPROTECTOR_PER_TASK
selected causes changes to include/generated/asm-offsets.h that
appended dtb booting does not like. But let's see what others
think.

Regards,

Tony



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: Nokia N900 on 5.4 and 5.5

From: Tony Lindgren <tony@atomide.com>
Date: 2020-02-07 17:01:59

* Tony Lindgren [off-list ref] [200207 16:54]:
* Merlijn Wajer [off-list ref] [200207 16:47]:
quoted
On 07/02/2020 17:36, Tony Lindgren wrote:
quoted
Looks like there's a regression in general for appended dtb booting that
was caused by commit 9f671e58159a ("security: Create "kernel hardening"
config area"). With that change we now get STACKPROTECTOR_PER_TASK
selected by default with Kconfig.

Merlijn, care to try to disable STACKPROTECTOR_PER_TASK in your
.config to see if that helps?
Yes, this makes the kernel boot.
OK good to hear. My guess is that having STACKPROTECTOR_PER_TASK
selected causes changes to include/generated/asm-offsets.h that
appended dtb booting does not like. But let's see what others
think.
I don't think this is an issue of CONFIG_STACKPROTECTOR + CONFIG_SMP
booted on UP machine as it only happens with appended dtb it seems.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: Nokia N900 on 5.4 and 5.5

From: Arthur D. <hidden>
Date: 2020-02-07 20:20:47

Hi.

I was able to build linux-5.5 and run it on N900 with no problems.
Even WiFi works, mmc0 is in place too. It seems you're doing something
wrong.

Were you able to build linux-5.1 with your scripts and run it on the
phone? I mean the pure linux-5.1 without configs and changes done
in https://github.com/maemo-leste/n9xx-linux.

BTW, I didn't find STACKPROTECTOR_PER_TASK option to be enabled in
omap2plus_defconfig.

--
Best regards, Spinal
* Tony Lindgren [off-list ref] [200207 16:54]:
quoted
* Merlijn Wajer [off-list ref] [200207 16:47]:
quoted
On 07/02/2020 17:36, Tony Lindgren wrote:
quoted
Looks like there's a regression in general for appended dtb booting  
that
quoted
quoted
was caused by commit 9f671e58159a ("security: Create "kernel  
hardening"
quoted
quoted
config area"). With that change we now get STACKPROTECTOR_PER_TASK
selected by default with Kconfig.

Merlijn, care to try to disable STACKPROTECTOR_PER_TASK in your
.config to see if that helps?
Yes, this makes the kernel boot.
OK good to hear. My guess is that having STACKPROTECTOR_PER_TASK
selected causes changes to include/generated/asm-offsets.h that
appended dtb booting does not like. But let's see what others
think.
I don't think this is an issue of CONFIG_STACKPROTECTOR + CONFIG_SMP
booted on UP machine as it only happens with appended dtb it seems.

Regards,

Tony
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: Nokia N900 on 5.4 and 5.5

From: Merlijn Wajer <hidden>
Date: 2020-02-08 01:48:48

Hi,

On 07/02/2020 21:20, Arthur D. wrote:
Hi.

I was able to build linux-5.5 and run it on N900 with no problems.
Even WiFi works, mmc0 is in place too. It seems you're doing something
wrong.
Well, I didn't try mmc0 on 5.5 (since it was also non-booting due to
issue below), so I will have to try that this weekend. The steps I
applied to build either kernels (5.1 with our patches, 5.4.18 and 5.5.2
are identical, except for the defconfig for our 5.1 branch)
Were you able to build linux-5.1 with your scripts and run it on the
phone? I mean the pure linux-5.1 without configs and changes done
in https://github.com/maemo-leste/n9xx-linux.

BTW, I didn't find STACKPROTECTOR_PER_TASK option to be enabled in
omap2plus_defconfig.
Well, I can assure you it was turned on on my system after a
omap2plus_defconfig. I do run Gentoo Hardened on my daily systems, so
perhaps that somehow makes a difference in what defconfig is picked.

Either way - the option is turned on by default after I make
omap2plus_defconfig, and it breaks appended DTB loading, so I hope we
can look at fixing that.

Cheers,
Merlijn

Re: Nokia N900 on 5.4 and 5.5

From: Ard Biesheuvel <hidden>
Date: 2020-02-13 21:34:05

On Sat, 8 Feb 2020 at 02:48, Merlijn Wajer [off-list ref] wrote:
Hi,

On 07/02/2020 21:20, Arthur D. wrote:
quoted
Hi.

I was able to build linux-5.5 and run it on N900 with no problems.
Even WiFi works, mmc0 is in place too. It seems you're doing something
wrong.
Well, I didn't try mmc0 on 5.5 (since it was also non-booting due to
issue below), so I will have to try that this weekend. The steps I
applied to build either kernels (5.1 with our patches, 5.4.18 and 5.5.2
are identical, except for the defconfig for our 5.1 branch)
quoted
Were you able to build linux-5.1 with your scripts and run it on the
phone? I mean the pure linux-5.1 without configs and changes done
in https://github.com/maemo-leste/n9xx-linux.

BTW, I didn't find STACKPROTECTOR_PER_TASK option to be enabled in
omap2plus_defconfig.
Well, I can assure you it was turned on on my system after a
omap2plus_defconfig. I do run Gentoo Hardened on my daily systems, so
perhaps that somehow makes a difference in what defconfig is picked.

Either way - the option is turned on by default after I make
omap2plus_defconfig, and it breaks appended DTB loading, so I hope we
can look at fixing that.
The STACKPROTECTOR_PER_TASK Kconfig option is only selectable if the
prerequisite GCC headers are found on your system which are needed to
build GCC plugins.

Is there any way you can enable early serial output one one of these
boards, to see if you are making it through the decompressor all the
way into the kernel?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: Nokia N900 on 5.4 and 5.5

From: Tony Lindgren <tony@atomide.com>
Date: 2020-02-13 21:44:54

* Ard Biesheuvel [off-list ref] [200213 21:34]:
Is there any way you can enable early serial output one one of these
boards, to see if you are making it through the decompressor all the
way into the kernel?
I was able to reproduce this on another board with appended dtb,
looks like uncompress happens fine but then nothing. Looking at
System.map the u-boot alignment warning Merlijn posted, pc is
somewhere very early in the kernel.

I can easily reproduce the issue now if you have something in mind
to try.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help