]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ARM: mm: fix set_memory_*() bounds checks
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 21 Nov 2016 16:02:08 +0000 (16:02 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 29 Nov 2016 18:00:34 +0000 (18:00 +0000)
commit580218f9678e76f712a1cf6cff5a903917fa9558
treec8c0e0f89a69097f23c10f8b97de5918f0859efa
parenta85b2257a57d5b3328fdecec9255c6d30c67c8bb
ARM: mm: fix set_memory_*() bounds checks

The set_memory_*() bounds checks are buggy on several fronts:

1. They fail to round the region size up if the passed address is not
   page aligned.
2. The region check was incomplete, and didn't correspond with what
   was being asked of apply_to_page_range()

So, rework change_memory_common() to fix these problems, adding an
"in_region()" helper to determine whether the start & size fit within
the provided region start and stop addresses.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/pageattr.c