* [PATCH] ARM: oabi-compat: fix epoll_ctl build failure
@ 2020-04-28 21:37 Arnd Bergmann
2020-04-29 6:28 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-04-28 21:37 UTC (permalink / raw)
To: Russell King
Cc: Arnd Bergmann, Christoph Hellwig, Russell King, linux-arm-kernel,
linux-kernel
Two functions are not declared or defined when CONFIG_EPOLL is
disabled:
arch/arm/kernel/sys_oabi-compat.c: In function 'sys_oabi_epoll_ctl':
arch/arm/kernel/sys_oabi-compat.c:258:6: error: implicit declaration of function 'ep_op_has_event' [-Werror=implicit-function-declaration]
258 | if (ep_op_has_event(op) &&
| ^~~~~~~~~~~~~~~
arch/arm/kernel/sys_oabi-compat.c:265:9: error: implicit declaration of function 'do_epoll_ctl'; did you mean 'sys_epoll_ctl'? [-Werror=implicit-function-declaration]
265 | return do_epoll_ctl(epfd, op, fd, &kernel, false);
| ^~~~~~~~~~~~
| sys_epoll_ctl
Blank out the entire function contents in this case.
Fixes: c281634c8652 ("ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Alternatively, we could use stub functions in the header file, or
hide the entire function and use sys_ni_syscall() to provide a
stub entry point.
---
arch/arm/kernel/sys_oabi-compat.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index 85a1e95341d8..cdc99bab1a1d 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -252,6 +252,7 @@ struct oabi_epoll_event {
asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
struct oabi_epoll_event __user *event)
{
+#ifdef CONFIG_EPOLL
struct oabi_epoll_event user;
struct epoll_event kernel;
@@ -263,6 +264,9 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
kernel.data = user.data;
return do_epoll_ctl(epfd, op, fd, &kernel, false);
+#else
+ return -ENOSYS;
+#endif
}
asmlinkage long sys_oabi_epoll_wait(int epfd,
--
2.26.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: oabi-compat: fix epoll_ctl build failure
2020-04-28 21:37 [PATCH] ARM: oabi-compat: fix epoll_ctl build failure Arnd Bergmann
@ 2020-04-29 6:28 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-04-29 6:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Russell King, Christoph Hellwig, Russell King, linux-arm-kernel,
linux-kernel
On Tue, Apr 28, 2020 at 11:37:30PM +0200, Arnd Bergmann wrote:
> Two functions are not declared or defined when CONFIG_EPOLL is
> disabled:
Can we just compile out the whole syscall handler and use
COND_SYSCALL_COMPAT or so?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-29 6:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 21:37 [PATCH] ARM: oabi-compat: fix epoll_ctl build failure Arnd Bergmann
2020-04-29 6:28 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).