arm64: handle vabits_actual symbol missing case

After kernel commit 0d9b1ffefabe ("arm64: mm: make vabits_actual
a build time constant if possible") introduced in Linux v5.19,
the crash will not find vabits_actual symbol if VA_BITS <= 48.
Add a fallback option to initialize VA_BITS based on the user
supplied machdep option.

Tested ramdumps loading in both 6.0 and 5.15 kernels.

Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
This commit is contained in:
Pavankumar Kondeti 2022-12-08 09:55:07 +05:30 committed by Kazuhito Hagio
parent 5f27639196
commit 141e75f3c1

View File

@ -4671,6 +4671,10 @@ arm64_calc_VA_BITS(void)
return;
} else if (arm64_set_va_bits_by_tcr()) {
return;
} else if (machdep->machspec->VA_BITS_ACTUAL) {
machdep->machspec->VA_BITS = machdep->machspec->VA_BITS_ACTUAL;
machdep->machspec->VA_START = _VA_START(machdep->machspec->VA_BITS_ACTUAL);
return;
}
if (!(sp = symbol_search("swapper_pg_dir")) &&