Lemote-3a-itx-a1101 kernel/PMON bug (Was: Bug#858405: xmlto: intermittent Segmentation fault when building manpages for libreswan on mips64el)

James Cowgill <[email protected]>
Newsgroups gmane.linux.debian.ports.mips,gmane.linux.debian.devel.kernel
Message-ID <[email protected]>
Hi,

[drop some CCs since this is not directly related to the xmlto bug]

On 24/03/17 09:36, YunQiang Su wrote:
> On Fri, Mar 24, 2017 at 1:06 AM, James Cowgill <[email protected]> wrote:
>> I believe any of the following will fix this (but have not all been tested):
>> - Reduce the stack usage in xsltproc (the upstream bug)
>> - Upgrade the relevant buildds to Linux >= 4.1
>> - Apply d1fd836dcf00 to jessie's kernel
>> - Disable PIE in xsltproc.
>> - Run xsltproc inside setarch -L / setarch -R
>>
> 
> we have some trouble to run newer kernel on some Loongson machines,
> as their pmon can only load initrd with limit size.
> So backports patch may ideal for us, now.

Are you referring to this issue?
https://lists.debian.org/debian-mips/2016/01/msg00009.html

This does only affect some Loongson machines. I think all the buildds
can be safely upgraded to 4.9 except for mipsel-manda-01 which has the
buggy PMON.

Looking at the bug again, all the extra .bss space comes from the giant
mem_section array which is always used on Loongson due to
STATIC_SPARSEMEM being enabled. I am wondering if this patch might help
(and if it works for multi-node Loongsons like the 3B). The Loongson
memory initialization code takes a different path to other mips
sub-arches and avoids calling memory_present until the very end, so it
might not need STATIC_SPARSEMEM?

(patch is completely untested)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 7baddfa0e229..3bbb454ab2f5 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2559,7 +2559,7 @@ config ARCH_DISCONTIGMEM_ENABLE

 config ARCH_SPARSEMEM_ENABLE
        bool
-       select SPARSEMEM_STATIC
+       select SPARSEMEM_STATIC if !MACH_LOONGSON64

 config NUMA
        bool "NUMA Support"

Thanks,
James
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJY1VJUAAoJEMfxZ23qLQHvn/4P/096jc1BLZhUbQikwg88A9jc
41FpuDRT5stxgzTvgmrLcnwHpunHrnVwG/qx9QIxtxAQfMdg5NbR4a+fkQ1j3pWl
L1c1paWhp3mnVQTPqcyAo6KaqtkyqNwclW5KscPz/xq16brtuzpH5HgnzTeHSAl0
dZCjBTaICo6Vbspyef5/RpPTRKLb8ioEgy0zhRpKdbgEBWur0xeUjTkM9SvBIY9h
ViEO8pJjUBm3UQZoCAKOIiFK5hRl0BY3OdEkBfSDVcQdAmla88bSw9+rehIT1IoS
nIMPyw/wRQAEKqQWpsrfCxwy6JyQYeMB07ILQbWsmi6qNmK/nprlOT+Hh8pSD57w
JDKOAuJ3yNYKD9Xco8PCnYOzyhBQX5BrsBK9ii5bpRWtGbFwPjQC/SRDp4XMoEqc
f8ku7SrolljAQyK6vL9kiIqbfYGX9Oygg6peEU0YnvO8A4QrczhB2exkctulsjdp
YOUB1FjXatGHizwOei41vF/F+2OYayyzLaSLGhDE1ByPE6d5IbwzQa/em6kvyxe4
zCTgYS/1lGQxS+mhLVK+k9lhrFXGbo1SHphHd7bXUnnEkog28B4Sv54F/CgOO0qS
xame5WQCO0AjsnC/3dhpH5Ow0JylnRsBHeJdHYMD9kAAJDKEGXzbqbnY7DMxAqvt
tmg4cBFPijlnaPHsDgRf
=gAzQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.