From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@lst.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH] [v2] ARM: oabi-compat: fix epoll_ctl build failure
Date: Wed, 29 Apr 2020 14:35:12 +0100 [thread overview]
Message-ID: <20200429133512.GE1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200429132349.1294904-1-arnd@arndb.de>
On Wed, Apr 29, 2020 at 03:23:24PM +0200, Arnd Bergmann wrote:
> 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
>
> Replace the function with the sys_ni_syscall stub in this case.
>
> Fixes: c281634c8652 ("ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: use sys_ni_syscall() instead of removing the function body
> ---
> arch/arm/kernel/sys_oabi-compat.c | 2 ++
> kernel/sys_ni.c | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
> index 85a1e95341d8..2488c69242cf 100644
> --- a/arch/arm/kernel/sys_oabi-compat.c
> +++ b/arch/arm/kernel/sys_oabi-compat.c
> @@ -249,6 +249,7 @@ struct oabi_epoll_event {
> __u64 data;
> } __attribute__ ((packed,aligned(4)));
>
> +#ifdef CONFIG_EPOLL
> asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
> struct oabi_epoll_event __user *event)
> {
> @@ -264,6 +265,7 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
>
> return do_epoll_ctl(epfd, op, fd, &kernel, false);
> }
> +#endif
>
> asmlinkage long sys_oabi_epoll_wait(int epfd,
> struct oabi_epoll_event __user *events,
> diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
> index 42ce28c460f6..9ee6a46b1795 100644
> --- a/kernel/sys_ni.c
> +++ b/kernel/sys_ni.c
> @@ -68,6 +68,7 @@ COND_SYSCALL(epoll_create1);
> COND_SYSCALL(epoll_ctl);
> COND_SYSCALL(epoll_pwait);
> COND_SYSCALL_COMPAT(epoll_pwait);
> +COND_SYSCALL(oabi_epoll_ctl); /* ARM OABI specific */
>
> /* fs/fcntl.c */
>
I know what Chris said, but do we really want to be polluting generic
kernel files with arch specific stuff like this?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up
next prev parent reply other threads:[~2020-04-29 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 13:23 [PATCH] [v2] ARM: oabi-compat: fix epoll_ctl build failure Arnd Bergmann
2020-04-29 13:35 ` Russell King - ARM Linux admin [this message]
2020-04-29 20:13 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429133512.GE1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=arnd@arndb.de \
--cc=hch@lst.de \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).