From: Herton R. Krzesinski <[email protected]>

Revert "ARM: fix __get_user_check() in case uaccess_* calls are not inlined"

This reverts commit 80660062260dec4bdca9540922577542c16145e8.

This was v1 of the patch posted upstream:
https://lore.kernel.org/patchwork/patch/1132459/

A second version was sent after it:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/[email protected]/

And it is the v2 the one which really was integrated upstream through
this commit:
...
commit 851140ab0d083c78e5723a8b1cbd258f567a7aff
Author: Masahiro Yamada <[email protected]>
Date:   Wed Oct 2 11:28:02 2019 +0100

    ARM: 8908/1: add __always_inline to functions called from __get_user_check()
...

Thus revert the old version which was applied to ARK and shouldn't be
needed anymore since the other version is already upstream.

Signed-off-by: Herton R. Krzesinski <[email protected]>

diff a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -195,12 +195,11 @@ extern int __get_user_64t_4(void *);
 #define __get_user_check(x, p)                                         \
        ({                                                              \
                unsigned long __limit = current_thread_info()->addr_limit - 1; \
-               unsigned int __ua_flags = uaccess_save_and_enable();    \
                register typeof(*(p)) __user *__p asm("r0") = (p);      \
                register __inttype(x) __r2 asm("r2");                   \
                register unsigned long __l asm("r1") = __limit;         \
                register int __e asm("r0");                             \
-               unsigned int __err;                                     \
+               unsigned int __ua_flags = uaccess_save_and_enable();    \
                switch (sizeof(*(__p))) {                               \
                case 1:                                                 \
                        if (sizeof((x)) >= 8)                           \
@@ -228,10 +227,9 @@ extern int __get_user_64t_4(void *);
                        break;                                          \
                default: __e = __get_user_bad(); break;                 \
                }                                                       \
-               __err = __e;                                            \
-               x = (typeof(*(p))) __r2;                                \
                uaccess_restore(__ua_flags);                            \
-               __err;                                                  \
+               x = (typeof(*(p))) __r2;                                \
+               __e;                                                    \
        })
 
 #define get_user(x, p)                                                 \

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/941
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to