]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
m68knommu: set ZERO_PAGE() to the allocated zeroed page
authorGreg Ungerer <gerg@linux-m68k.org>
Wed, 20 Apr 2022 13:27:47 +0000 (23:27 +1000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:52:53 +0000 (10:52 +0200)
commitf78e8f1933e023042d6aaaf70e50de3d89d9fab0
tree64794581ae12396a4122207de5fb5138e6cc6d43
parenteea6e4360c80bd70129172dc88c2e830079eee5f
m68knommu: set ZERO_PAGE() to the allocated zeroed page

BugLink: https://bugs.launchpad.net/bugs/1982968
[ Upstream commit dc068f46217970d9516f16cd37972a01d50dc055 ]

The non-MMU m68k pagetable ZERO_PAGE() macro is being set to the
somewhat non-sensical value of "virt_to_page(0)". The zeroth page
is not in any way guaranteed to be a page full of "0". So the result
is that ZERO_PAGE() will almost certainly contain random values.

We already allocate a real "empty_zero_page" in the mm setup code shared
between MMU m68k and non-MMU m68k. It is just not hooked up to the
ZERO_PAGE() macro for the non-MMU m68k case.

Fix ZERO_PAGE() to use the allocated "empty_zero_page" pointer.

I am not aware of any specific issues caused by the old code.

Link: https://lore.kernel.org/linux-m68k/2a462b23-5b8e-bbf4-ec7d-778434a3b9d7@google.com/T/#t
Reported-by: Hugh Dickens <hughd@google.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/m68k/include/asm/pgtable_no.h