From: Frantisek Hrbata <fhrbata@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, oleg@redhat.com,
kamaleshb@in.ibm.com, hechjie@cn.ibm.com,
akpm@linux-foundation.org, dave.hansen@intel.com,
dvlasenk@redhat.com, prarit@redhat.com, lwoodman@redhat.com,
hannsj_uhl@de.ibm.com, torvalds@linux-foundation.org
Subject: [RESEND PATCH 4/4] x86: remove high_memory check from valid_phys_addr_range
Date: Mon, 29 Sep 2014 13:33:02 +0200 [thread overview]
Message-ID: <1411990382-11902-5-git-send-email-fhrbata@redhat.com> (raw)
In-Reply-To: <1411990382-11902-1-git-send-email-fhrbata@redhat.com>
There is no need to block read/write access to /dev/mem for phys. addr. above
high_memory for non-system RAM. The only limitation should be
boot_cpu_data.x86_phys_bits(max phys. addr. size).
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
---
arch/x86/mm/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index c8acb10..7fa0242 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -127,7 +127,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
int valid_phys_addr_range(phys_addr_t addr, size_t count)
{
- return addr + count <= __pa(high_memory);
+ return arch_pfn_possible((addr + count) >> PAGE_SHIFT);
}
int valid_mmap_phys_addr_range(unsigned long pfn, size_t count)
--
1.9.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-09-29 11:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 11:32 [RESEND PATCH 0/4] x86: /dev/mem fixes Frantisek Hrbata
2014-09-29 11:32 ` [RESEND PATCH 1/4] x86: add arch_pfn_possible helper Frantisek Hrbata
2014-09-29 11:33 ` [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap Frantisek Hrbata
2014-09-29 20:15 ` Thomas Gleixner
2014-09-30 12:41 ` Frantisek Hrbata
2014-09-30 14:27 ` Dave Hansen
2014-09-30 16:33 ` Frantisek Hrbata
2014-09-30 21:57 ` Thomas Gleixner
2014-09-29 11:33 ` [RESEND PATCH 3/4] x86: add high_memory check to (xlate|unxlate)_dev_mem_ptr Frantisek Hrbata
2014-09-29 11:33 ` Frantisek Hrbata [this message]
2014-09-30 16:24 ` [PATCH v2 0/4] x86: /dev/mem fixes Frantisek Hrbata
2014-09-30 16:25 ` [PATCH v2 1/4] x86: add arch_pfn_possible helper Frantisek Hrbata
2014-09-30 16:25 ` [PATCH v2 2/4] x86: add phys addr validity check for /dev/mem mmap Frantisek Hrbata
2014-09-30 16:25 ` [PATCH v2 3/4] x86: add high_memory check to (xlate|unxlate)_dev_mem_ptr Frantisek Hrbata
2014-09-30 16:25 ` [PATCH v2 4/4] x86: remove high_memory check from valid_phys_addr_range Frantisek Hrbata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411990382-11902-5-git-send-email-fhrbata@redhat.com \
--to=fhrbata@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=dvlasenk@redhat.com \
--cc=hannsj_uhl@de.ibm.com \
--cc=hechjie@cn.ibm.com \
--cc=hpa@zytor.com \
--cc=kamaleshb@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lwoodman@redhat.com \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=prarit@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).