From patchwork Fri Mar 24 07:36:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 13186507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E03DDC6FD20 for ; Fri, 24 Mar 2023 07:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=5PuSdZWFYBBLA/MyzS5NoYoon+pnaoGSm9W4sdMaSI8=; b=4HcV8Zi0v7TgEx j9/k/JoHClenSghI2+PhGsW9u6cITUkFCQHh6sWYI8GwvZDqxxis9XbPRy4fwL+WeDMbcfljwxnxu D5CyrofmvXNfipjzDvBKQ5ZKrtGEokFnizzLu+A+HVCYzqv51qoKojTfPstHnewOdSOKmfuHOTAUa PrboNmk0B5GGBnoLGYycxQIQ/uKjGlev/uDkqhEzkyML4YiVAaaqMxGs4V6VdDQZcbiHKbuuzs21m TmhixSLZxbz2DZkaYCWQFWVLEjtLao9buydK5uCEve1rhRpdFa5vM0E5fBRBemP61wxuEPMWv0Kmi 8aMNKQF0NMyhFTE5+CuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfbyh-003mMy-1n; Fri, 24 Mar 2023 07:36:47 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfbyd-003mM7-1s for linux-riscv@lists.infradead.org; Fri, 24 Mar 2023 07:36:45 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id ED0E1B81FDA; Fri, 24 Mar 2023 07:36:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC356C433D2; Fri, 24 Mar 2023 07:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679643400; bh=BBS9cSTname+Z1/k6YNt/nmdj4wvYmKElUY7I0mcqBI=; h=From:To:Cc:Subject:Date:From; b=rDQrw1PN087BeT3VrGtecrJalaSgojkdpf8sH9ycPAcc0VFY6USfYCuXf+HzgvtnY ZBKrIykAz+2aq/t8xLXZCtuXq9cyOQ5KRfH6pwn+9h633cZ19+Kegx48iGbQvPX2a/ rPUaVZ0+3vvBrOat7/3QV/XC+xOkLSjUwBrLH3uPGL43Q0zkskOYaj0XMx439stJcp 8NfnYd9S7Haxb5Kni2pjf3swk6A8VWJysCTx5ktEE1jbEKPdukR2n65lkpzX1PZYe4 pH7foapRz5RZa4b16jkHjNxWpRB+XNZypEGbI8+wqD/xgA5hQ2ucUf4furLV82OnoD RI4dApSC69dsQ== From: guoren@kernel.org To: arnd@arndb.de, guoren@kernel.org, palmer@rivosinc.com, conor.dooley@microchip.com, heiko@sntech.de, jszhang@kernel.org, lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org, esyr@redhat.com Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren , Christoph Hellwig Subject: [PATCH V3] uapi: Fixup strace compile error Date: Fri, 24 Mar 2023 03:36:30 -0400 Message-Id: <20230324073630.161034-1-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230324_003643_919862_AB54E5FF X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Guo Ren Export F_*64 definitions to userspace permanently. "ifndef" usage made it vailable at all times to the userspace, and this change has actually broken building strace with the latest kernel headers. There could be some debate whether having these F_*64 definitions exposed to the user space 64-bit applications, but it seems that were no harm (as they were exposed already for quite some time), and they are useful at least for strace for compat application tracing purposes. Here is the compile error log: ../../../src/xlat/fcntlcmds.h:54:7: error: ‘F_GETLK64’ undeclared here (not in a function); did you mean ‘F_GETLK’? 54 | XLAT(F_GETLK64), | ^~~~~~~~~ ../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’ 64 | # define XLAT(val) { (unsigned)(val), #val } | ^~~ ../../../src/xlat/fcntlcmds.h:57:7: error: ‘F_SETLK64’ undeclared here (not in a function); did you mean ‘F_SETLK’? 57 | XLAT(F_SETLK64), | ^~~~~~~~~ ../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’ 64 | # define XLAT(val) { (unsigned)(val), #val } | ^~~ ../../../src/xlat/fcntlcmds.h:60:7: error: ‘F_SETLKW64’ undeclared here (not in a function); did you mean ‘F_SETLKW’? 60 | XLAT(F_SETLKW64), | ^~~~~~~~~~ ../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’ 64 | # define XLAT(val) { (unsigned)(val), #val } Fixes: 306f7cc1e9061 "uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h" Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reported-by: Eugene Syromiatnikov Acked-by: Palmer Dabbelt Cc: Christoph Hellwig Cc: Arnd Bergmann Cc: Heiko Stuebner Reviewed-by: Christoph Hellwig --- Changelog v3: - Add error log v2: https://lore.kernel.org/lkml/20220804025448.1240780-1-guoren@kernel.org/ - Optimize commit log v1: https://lore.kernel.org/lkml/20220613013051.1741434-1-guoren@kernel.org/ --- include/uapi/asm-generic/fcntl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index 1ecdb911add8..3a389895328a 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -116,13 +116,11 @@ #define F_GETSIG 11 /* for sockets. */ #endif -#if __BITS_PER_LONG == 32 || defined(__KERNEL__) #ifndef F_GETLK64 #define F_GETLK64 12 /* using 'struct flock64' */ #define F_SETLK64 13 #define F_SETLKW64 14 #endif -#endif /* __BITS_PER_LONG == 32 || defined(__KERNEL__) */ #ifndef F_SETOWN_EX #define F_SETOWN_EX 15