]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/mm: Use proper mask when setting PUD mapping
authorAaron Lu <aaron.lu@intel.com>
Fri, 19 Aug 2022 02:30:01 +0000 (10:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:37:49 +0000 (11:37 +0200)
commit6876b4804b041856a8a390b949983ae00d1fd5b8
tree04943f62ef34689842d8674bb22486b9d3d8dd46
parentb68e40b52f179f27912c4f35598f9c9b2e93a40c
x86/mm: Use proper mask when setting PUD mapping

commit 88e0a74902f894fbbc55ad3ad2cb23b4bfba555c upstream.

Commit c164fbb40c43f("x86/mm: thread pgprot_t through
init_memory_mapping()") mistakenly used __pgprot() which doesn't respect
__default_kernel_pte_mask when setting PUD mapping.

Fix it by only setting the one bit we actually need (PSE) and leaving
the other bits (that have been properly masked) alone.

Fixes: c164fbb40c43 ("x86/mm: thread pgprot_t through init_memory_mapping()")
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/mm/init_64.c