We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2017-07-03 11:50:48 +0200

need to save/restore arm register(r11) when it is corrupted in kernel-arch-arm

In cpu_v7_do_suspend routine, r11 is used while it is NOT saved/restored, different compiler may have different usage of ARM general registers, so it may cause issues during calling cpu_v7_do_suspend.

We meet kernel fault occurs when using GCC 4.8.3, r11 contains valid value before calling into cpu_v7_do_suspend, but when returned from this routine, r11 is corrupted and lead to kernel fault. Doing save/restore for those corrupted registers is a must in assemble code.

Patch for kernel 3.4 is available

File affected: kernel-adaptation-sbj-3.4.108.20161101.1/arch/arm/mm/proc-v7.S lines 97-103; 108-114

need to save/restore arm register(r11) when it is corrupted in kernel-arch-arm

In cpu_v7_do_suspend routine, r11 is used while it is NOT saved/restored, different compiler may have different usage of ARM general registers, so it may cause issues during calling cpu_v7_do_suspend.

We meet kernel fault occurs when using GCC 4.8.3, r11 contains valid value before calling into cpu_v7_do_suspend, but when returned from this routine, r11 is corrupted and lead to kernel fault. Doing save/restore for those corrupted registers is a must in assemble code.

Patch for kernel 3.4 is availableavailable.

File affected: kernel-adaptation-sbj-3.4.108.20161101.1/arch/arm/mm/proc-v7.S lines 97-103; 108-114

need to save/restore arm register(r11) when it is corrupted in kernel-arch-arm

In cpu_v7_do_suspend routine, r11 is used while it is NOT saved/restored, different compiler may have different usage of ARM general registers, so it may cause issues during calling cpu_v7_do_suspend.

We meet kernel fault occurs when using GCC 4.8.3, r11 contains valid value before calling into cpu_v7_do_suspend, but when returned from this routine, r11 is corrupted and lead to kernel fault. Doing save/restore for those corrupted registers is a must in assemble code.

Patch for kernel 3.4 is available.available

File affected: kernel-adaptation-sbj-3.4.108.20161101.1/arch/arm/mm/proc-v7.S lines 97-103; 108-114

need to save/restore arm register(r11) when it is corrupted in kernel-arch-arm

In cpu_v7_do_suspend routine, r11 is used while it is NOT saved/restored, different compiler may have different usage of ARM general registers, so it may cause issues during calling cpu_v7_do_suspend.

We meet kernel fault occurs when using GCC 4.8.3, r11 contains valid value before calling into cpu_v7_do_suspend, but when returned from this routine, r11 is corrupted and lead to kernel fault. Doing save/restore for those corrupted registers is a must in assemble code.

Patch for kernel 3.4 is available

File affected: kernel-adaptation-sbj-3.4.108.20161101.1/arch/arm/mm/proc-v7.S lines 97-103; 108-114