]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xtensa: make sure bFLT stack is 16 byte aligned
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 4 Nov 2018 08:46:00 +0000 (01:46 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:58:52 +0000 (19:58 -0600)
commit2847f30d9061808bafcb7cbab7b322a315e2115d
tree298d20f3d5c60725a9423758a19e742872a3efcd
parent7190fb12155c9559e2d501727e46d6637cf7794e
xtensa: make sure bFLT stack is 16 byte aligned

BugLink: https://bugs.launchpad.net/bugs/1836802
commit 0773495b1f5f1c5e23551843f87b5ff37e7af8f7 upstream.

Xtensa ABI requires stack alignment to be at least 16. In noMMU
configuration ARCH_SLAB_MINALIGN is used to align stack. Make it at
least 16.

This fixes the following runtime error in noMMU configuration, caused by
interaction between insufficiently aligned stack and alloca function,
that results in corruption of on-stack variable in the libc function
glob:

 Caught unhandled exception in 'sh' (pid = 47, pc = 0x02d05d65)
  - should not happen
  EXCCAUSE is 15

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/xtensa/include/asm/processor.h