> So we now map the PMD-sized page into userspace, even though it has a > HWPoison in it. Yes that's bad. It might panic the system. > > I think there are two things that we should be doing: > > 1. Attempt to split THPs which are file-backed. That makes most of this > problem disappear because there won't be THPs with HWPoison, mostly. That seems simple and sensible. > 2. When the THP fails to split, use a spare page flag to indicate that > the THP contains a HWPoison bit in one of its subpages. There are a > lot of PF_SECOND flags available for this purpose. Why should it fail? I thought splitting always succeeds. -Andi