In the Linux kernel, the following vulnerability has been resolved:
s390/mm: Fix VMFAULTHWPOISON handling in do_exception()
There is no support for HWPOISON, MEMORYFAILURE, or ARCHHASCOPYMC on s390. Therefore we do not expect to see VMFAULTHWPOISON in do_exception().
However, since commit af19487f00f3 ("mm: make PTEMARKERSWAPINERROR more general"), it is possible to see VMFAULTHWPOISON in combination with PTEMARKERPOISONED, even on architectures that do not support HWPOISON otherwise. In this case, we will end up on the BUG() in doexception().
Fix this by treating VMFAULTHWPOISON the same as VMFAULTSIGBUS, similar to x86 when MEMORY_FAILURE is not configured. Also print unexpected fault flags, for easier debugging.
Note that VMFAULTHWPOISON_LARGE is not expected, because s390 cannot support swap entries on other levels than PTE level.