aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorLinus Walleij2019-04-08 13:03:09 +0200
committerLinus Walleij2019-04-08 13:03:09 +0200
commit26af34079f1d8299932303cfd2b376b9cf55a35c (patch)
treef1a9824855fae569aa51c2109a5929715143093d /arch/x86/mm
parent27157af66324d529b43231c12b5d1e1a3e9fa620 (diff)
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
Merge tag 'v5.1-rc3' into devel
Linux 5.1-rc3
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/mmap.c2
-rw-r--r--arch/x86/mm/pti.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index db3165714521..dc726e07d8ba 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -230,7 +230,7 @@ bool mmap_address_hint_valid(unsigned long addr, unsigned long len)
/* Can we access it for direct reading/writing? Must be RAM: */
int valid_phys_addr_range(phys_addr_t addr, size_t count)
{
- return addr + count <= __pa(high_memory);
+ return addr + count - 1 <= __pa(high_memory - 1);
}
/* Can we access it through mmap? Must be a valid physical address: */
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 4fee5c3003ed..139b28a01ce4 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -77,7 +77,7 @@ static void __init pti_print_if_secure(const char *reason)
pr_info("%s\n", reason);
}
-enum pti_mode {
+static enum pti_mode {
PTI_AUTO = 0,
PTI_FORCE_OFF,
PTI_FORCE_ON
@@ -602,7 +602,7 @@ static void pti_clone_kernel_text(void)
set_memory_global(start, (end_global - start) >> PAGE_SHIFT);
}
-void pti_set_kernel_image_nonglobal(void)
+static void pti_set_kernel_image_nonglobal(void)
{
/*
* The identity map is created with PMDs, regardless of the