x86/boot: Fix memremap of setup_indirect structures
stable inclusion from stable-v5.10.106 commit b3444e5b640a41eb35250ac9882cf7ac36fa8f66 bugzilla: https://gitee.com/openeuler/kernel/issues/I573US Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b3444e5b640a41eb35250ac9882cf7ac36fa8f66 -------------------------------- commit 7228918b upstream. As documented, the setup_indirect structure is nested inside the setup_data structures in the setup_data list. The code currently accesses the fields inside the setup_indirect structure but only the sizeof(struct setup_data) is being memremapped. No crash occurred but this is just due to how the area is remapped under the covers. Properly memremap both the setup_data and setup_indirect structures in these cases before accessing them. Fixes: b3c72fc9 ("x86/boot: Introduce setup_indirect") Signed-off-by: NRoss Philipson <ross.philipson@oracle.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NDaniel Kiper <daniel.kiper@oracle.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1645668456-22036-2-git-send-email-ross.philipson@oracle.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYu Liao <liaoyu15@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录