ARM: uaccess: Add missing include for set_thread_flag
PATCH 1/1 ARM: uaccess: Add missing include for set_thread_flag
Fixes "implicit declaration of function" compile error for out-of-tree kernel modules including asm/uaccess.h.
--- arch/arm/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+)
arch/arm/include/asm/uaccess.h +1 -0
@@ -17,6 +17,7 @@#include <asm/unified.h> #include <asm/compiler.h> +#include <linux/thread_info.h> #include <asm/extable.h> /*
Signature · 1 line
2.13.2
Quoted 2 lines · Jonathan Liu
Fixes "implicit declaration of function" compile error for out-of-tree kernel modules including
asm/uaccess.h.
I failed to reproduce this issue by creating an out of tree module with a separate file (with only uaccess.h). Are you using a special config?
Looking at the headers on uaccess.h. You get thread_info through:
asm/domain.h -> asm/thread_info.h
Quoted 22 lines
Fixes 73ac5d6a2b6a ("arm/syscalls: Check address limit on user-mode return")Signed-off-by Jonathan Liu <[email protected]>--- arch/arm/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+)arch/arm/include/asm/uaccess.h +1
-1@@ -17,6 +17,7 @@#include <asm/unified.h> #include <asm/compiler.h> +#include <linux/thread_info.h> #include <asm/extable.h> /* -- 2.13.2
Signature · 1 line
Thomas
Hi Thomas,
The top of the C source file I am compiling has:
#include <linux/kernel.h>
#include <asm/uaccess.h>
Tracing through the asm/uaccess.h include I see asm/uaccess.h -> asm/domain.h -> asm/thread_info.h
but set_thread_info is defined in linux/thread_info.h not asm/thread_info.h (see
http://elixir.free-electrons.com/linux/v4.14-rc1/ident/set_thread_flag).
Regards,
Jonathan
Quoted 39 lines · Thomas Garnier
Quoted 2 lines · Jonathan Liu
Fixes "implicit declaration of function" compile error for out-of-tree kernel modules including
asm/uaccess.h.I failed to reproduce this issue by creating an out of tree module with a separate file (with only
uaccess.h). Are you using a special config?Looking at the headers on
uaccess.h. You getthread_infothrough:
asm/domain.h->asm/thread_info.hQuoted 20 lines
Fixes 73ac5d6a2b6a ("arm/syscalls: Check address limit on user-mode return")Signed-off-by Jonathan Liu <[email protected]>--- arch/arm/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+)arch/arm/include/asm/uaccess.h +1
-1@@ -17,6 +17,7 @@#include <asm/unified.h> #include <asm/compiler.h> +#include <linux/thread_info.h> #include <asm/extable.h> /* -- Quoted 2 lines
2.13.2
--
Thomas
Quoted 7 lines · Jonathan Liu
Hi Thomas,
The top of the C source file I am compiling has:
#include <linux/kernel.h>
#include <asm/uaccess.h>
Quoted 6 lines
Tracing through the
asm/uaccess.hinclude I seeasm/uaccess.h->asm/domain.h->asm/thread_info.hbut
set_thread_infois defined inlinux/thread_info.hnotasm/thread_info.h(see
http://elixir.free-electrons.com/linux/v4.14-rc1/ident/set_thread_flag).
I see, I think I could not reproduce this issue because I already reverted the original commit in favor of a different approach on linux-next (see commit 2404269bc4e77a67875c8db6667be34c9913c96e).
Let me know if this commit resolve the issue and thanks for reaching out.
Quoted 44 lines
Regards,
JonathanQuoted 39 lines · Thomas Garnier
Quoted 2 lines · Jonathan Liu
Fixes "implicit declaration of function" compile error for out-of-tree kernel modules including
asm/uaccess.h.I failed to reproduce this issue by creating an out of tree module with a separate file (with only
uaccess.h). Are you using a special config?Looking at the headers on
uaccess.h. You getthread_infothrough:
asm/domain.h->asm/thread_info.hQuoted 20 lines
Fixes 73ac5d6a2b6a ("arm/syscalls: Check address limit on user-mode return")Signed-off-by Jonathan Liu <[email protected]>--- arch/arm/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+)arch/arm/include/asm/uaccess.h +1
-1@@ -17,6 +17,7 @@#include <asm/unified.h> #include <asm/compiler.h> +#include <linux/thread_info.h> #include <asm/extable.h> /* -- Quoted 2 lines
2.13.2
--
Thomas
Signature · 1 line
Thomas
Hi Thomas,
Quoted 15 lines · Thomas Garnier
Quoted 7 lines · Jonathan Liu
Hi Thomas,
The top of the C source file I am compiling has:
#include <linux/kernel.h>
#include <asm/uaccess.h>Quoted 6 lines
Tracing through the
asm/uaccess.hinclude I seeasm/uaccess.h->asm/domain.h->asm/thread_info.hbut
set_thread_infois defined inlinux/thread_info.hnotasm/thread_info.h(see
http://elixir.free-electrons.com/linux/v4.14-rc1/ident/set_thread_flag).
Quoted 6 lines
I see, I think I could not reproduce this issue because I already reverted the original commit in favor of a different approach on linux-next (see commit
2404269bc4e77a67875c8db6667be34c9913c96e).Let me know if this commit resolve the issue and thanks for reaching out.
Cherry-picking commit 2404269bc4e77a67875c8db6667be34c9913c96e on top of 4.14-rc1 resolves the issue.
Thanks.
Quoted 48 lines
Quoted 44 lines
Regards,
JonathanQuoted 39 lines · Thomas Garnier
Quoted 2 lines · Jonathan Liu
Fixes "implicit declaration of function" compile error for out-of-tree kernel modules including
asm/uaccess.h.I failed to reproduce this issue by creating an out of tree module with a separate file (with only
uaccess.h). Are you using a special config?Looking at the headers on
uaccess.h. You getthread_infothrough:
asm/domain.h->asm/thread_info.hQuoted 20 lines
Fixes 73ac5d6a2b6a ("arm/syscalls: Check address limit on user-mode return")Signed-off-by Jonathan Liu <[email protected]>--- arch/arm/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+)arch/arm/include/asm/uaccess.h +1
-1@@ -17,6 +17,7 @@#include <asm/unified.h> #include <asm/compiler.h> +#include <linux/thread_info.h> #include <asm/extable.h> /* -- Quoted 2 lines
2.13.2
--
Thomas
Quoted 2 lines
--
Thomas
Regards,
Jonathan