[PATCH] powerpc/mce: Avoid using addr_to_pfn in realmode
Nicholas Piggin
npiggin at gmail.com
Mon Jun 22 12:16:11 AEST 2020
Excerpts from Ganesh Goudar's message of June 20, 2020 10:44 pm:
> When an UE or memory error exception is encountered the MCE handler
> tries to find the pfn using addr_to_pfn() which takes effective
> address as an argument, later pfn is used to poison the page where
> memory error occurred, recent rework in this area made addr_to_pfn
> to run in realmode, which can be fatal as it may try to access
> memory outside RMO region.
>
> To fix this move the use of addr_to_pfn to save_mce_event(), which
> runs in virtual mode.
I'd rather this be done in the pseries mce handler rather than
change bare metal, and leaving save_mce_event as purely recording the
event, decoding remains in its caller.
Radix guests also don't have an RMO, we could probably restrict that
pseries hack to hash. I want to get rid of it but it will take longer
to fix things properly.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list