It seems that the cacheflush syscall got broken when PAN for LPAE was
implemented. User access was not enabled around the cache maintenance
instructions, causing them to fault.
Fixes: 7af5b901e847 ("ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement")
Reported-by: Michał Pecio <michal.pecio@gmail.com>
Tested-by: Michał Pecio <michal.pecio@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
 static inline int
 __do_cache_op(unsigned long start, unsigned long end)
 {
+       unsigned int ua_flags;
        int ret;
 
        do {
                if (fatal_signal_pending(current))
                        return 0;
 
+               ua_flags = uaccess_save_and_enable();
                ret = flush_icache_user_range(start, start + chunk);
+               uaccess_restore(ua_flags);
                if (ret)
                        return ret;