[RFC PATCH 1/6] ARC: mm/mmap.c: Check length of unmapped area before allowing MAP_FIXED

2021-12-06 Thread Liam Howlett
arch_get_unmapped_area() could potentially allow a larger than possible length when using the MAP_FIXED flag. The bound check should come before the check for MAP_FIXED. Fixes: 5bba49f5397c (ARC: [mm] Aliasing VIPT dcache support 4/4) Signed-off-by: Liam R. Howlett --- arch/arc/mm/mmap.c | 6 ++

[RFC PATCH 0/6] Check length of unmapped area on MAP_FIXED

2021-12-06 Thread Liam Howlett
RFC because the patches are not well tested. I've not triggered the issue these patches fix, but have compile tested arm, sh, and sparc64 using the default config. Please test the patches before accepting them on your arch. arc, arm, nds32, sparc32 and sparc64 do not check the size of the reques