From patchwork Tue Dec 15 01:25:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11973537 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E845C4361B for ; Tue, 15 Dec 2020 01:27:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2501521D42 for ; Tue, 15 Dec 2020 01:27:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2501521D42 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=H6yfNhVSG4pvJKEcUjQFrDtOwsplTbCFzcIxZ+Fe78c=; b=H1pG4E5BjjOBYeMKuW2oyeZegi P6N2nHv1S5KCAnjkxF8NiKSFh+XJ9ZP2NCfLjGxaUPsr/T5DJ7E0R62kaRisUhj7Y5R7SS6X1tSfr /9uwlOLXCUIf3rA8HtLIza0AfR/SdoeMiOVDv7dd/qedJcnmDcxx6iWSElQM82CyH2ZLcmmtt4YpL NR63MHFIC3PzFrFLmxFxfmuN9qhUgYUzxRKWWyw5qv4g4Hea93DKoSJ7JIHHUL1F1cy2xFm2exfhr aPztJHSUJJMramRKLSLLQU/ep3cOuomJ70+EsfNFpgRLCoebJOmWIEFWq7m1Rf9NbDpeiS9Fj2rq6 G9KAdDrw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1koz6M-0005i5-6h; Tue, 15 Dec 2020 01:26:06 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1koz6K-0005ht-SF; Tue, 15 Dec 2020 01:26:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=hmZnhIYLcuy3j4UsuWnrlAWdET4FNutJx46YotKNVgY=; b=MK5eUcYknU902DpB/sOFcYXmeJ jT2xvynlVUi0Vtn1B6Em/hny725pQcsEyh4JEz/NxEJ+tiiucH2GSSc79d0nqhOydrsD9O3xWssX4 44UGDw8DkVLGZwEjxdb+tdL+lpswEZnrNAQ2ofHa8CwLUama3trmuvVUWvV6a0yOiqJTy2+OyTV6L bHOe6JZnHe6iAQRA6+1QbbBmtrCCKnRPyDaQBP+7v3YGybdV/eYblTTyuteEn9tlfe2RxZ3bJhiig Vny1OW+4isTih+gkN3wf0chduU309HeCtirsqlgHFHM+cuQiS7iK8t5/BNiOIQ7eB38dTL0uegeTW Q12sY1GQ==; Received: from [2601:1c0:6280:3f0::1494] (helo=smtpauth.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1koz6H-0004aM-2u; Tue, 15 Dec 2020 01:26:01 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Subject: [PATCH] arm: OABI compat: fix build when EPOLL is not enabled Date: Mon, 14 Dec 2020 17:25:56 -0800 Message-Id: <20201215012556.27476-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel test robot , Nicolas Pitre , Randy Dunlap , Russell King , Alexander Viro , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When CONFIG_EPOLL is not set/enabled, sys_oabi-compat.c has build errors. Fix these by surrounding them with ifdef CONFIG_EPOLL/endif and providing stubs for the "EPOLL is not set" case. ../arch/arm/kernel/sys_oabi-compat.c: In function 'sys_oabi_epoll_ctl': ../arch/arm/kernel/sys_oabi-compat.c:257:6: error: implicit declaration of function 'ep_op_has_event' [-Werror=implicit-function-declaration] 257 | if (ep_op_has_event(op) && | ^~~~~~~~~~~~~~~ ../arch/arm/kernel/sys_oabi-compat.c:264:9: error: implicit declaration of function 'do_epoll_ctl'; did you mean 'sys_epoll_ctl'? [-Werror=implicit-function-declaration] 264 | return do_epoll_ctl(epfd, op, fd, &kernel, false); | ^~~~~~~~~~~~ Fixes: 687ad0191488 ("[ARM] 3109/1: old ABI compat: syscall wrappers for ABI impedance matching") Signed-off-by: Randy Dunlap Reported-by: kernel test robot # from an lkp .config file Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: Nicolas Pitre Cc: Alexander Viro --- or does OABI require epoll? how is that enforced? arch/arm/kernel/sys_oabi-compat.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- linux-next-20201214.orig/arch/arm/kernel/sys_oabi-compat.c +++ linux-next-20201214/arch/arm/kernel/sys_oabi-compat.c @@ -248,6 +248,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) { @@ -298,6 +299,20 @@ asmlinkage long sys_oabi_epoll_wait(int kfree(kbuf); return err ? -EFAULT : ret; } +#else +asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, + struct oabi_epoll_event __user *event) +{ + return -EINVAL; +} + +asmlinkage long sys_oabi_epoll_wait(int epfd, + struct oabi_epoll_event __user *events, + int maxevents, int timeout) +{ + return -EINVAL; +} +#endif struct oabi_sembuf { unsigned short sem_num;