arm: fixmap: implement __set_fixmap()

This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h.
Also makes sure that the fixmap allocation fits into the expected range.

Based on patch by Rabin Vincent.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Rabin Vincent <rabin@rab.in>
Acked-by: Nicolas Pitre <nico@linaro.org>
This commit is contained in:
Kees Cook
2014-04-04 23:27:49 +02:00
parent 836a241832
commit 99b4ac9afc
2 changed files with 26 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ enum fixed_addresses {
__end_of_fixed_addresses
};
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
#include <asm-generic/fixmap.h>
#endif